
#include "uncategorized.h"

// 7D3E
AppRunInfoType infos[12][27] = {
    // 78A4
    {//词典
        {//朗文英汉
            0x7EFD,
            0x0016C000,
            0x00,
            0x00000000,
            "Dict",
        },
        {//朗文英英
            0x7F00,
            0x0016C000,
            0x00,
            0x00000000,
            "Dict",
        },
        {//朗文十万
            0x7EF7,
            0x0016C000,
            0x00,
            0x00000000,
            "Dict",
        },
        {//现代汉语
            0x7EEB,
            0x0016C000,
            0x00,
            0x00000000,
            "Dict",
        },
        {//现汉汉英
            0x7EE8,
            0x0016C000,
            0x00,
            0x00000000,
            "Dict",
        },
        {//多音词典
            0x7EF1,
            0x0016C000,
            0x00,
            0x00000000,
            "Dict",
        },
        {//成语词典
            0x7EEE,
            0x0016C000,
            0x00,
            0x00000000,
            "Dict",
        },
        {//西文词典
            0x7EFA,
            0x0016C000,
            0x00,
            0x00000000,
            "Dict",
        },
        {//万用词汇
            0x7F03,
            0x00168000,
            0x00,
            0x00000000,
            "Dict",
        },
        {//朗文附录
            0x7EF4,
            0x00170000,
            0x00,
            0x00000000,
            "Dict",
        },
        {//自建词库
            0x7EDF,
            0x0016C000,
            0x00,
            0x00000000,
            "Dict",
        },
    },
    // 7A94
    {//课程
        {//黄冈简介
            0x7F6C,
            0x0016C000,
            0x00,
            0x00000000,
            "Dict",
        },
        {//课程要点
            0x7F6F,
            0x0016C000,
            0x00,
            0x00000000,
            "Dict",
        },
    },
    // 79F9
    {//试题
        {//语文试题
            0x7F72,
            0x0016C000,
            0x00,
            0x00000000,
            "Dict",
        },
        {//数学试题
            0x7F75,
            0x0016C000,
            0x00,
            0x00000000,
            "Dict",
        },
        {//英语试题
            0x7F78,
            0x0016C000,
            0x00,
            0x00000000,
            "Dict",
        },
        {//物理试题
            0x7F7B,
            0x0016C000,
            0x00,
            0x00000000,
            "Dict",
        },
        {//化学试题
            0x7F7E,
            0x0016C000,
            0x00,
            0x00000000,
            "Dict",
        },
    },
    // 7C84
    {//听力
        {//日常用语
            0x7F4E,
            0x00030000,
            0x00,
            0x00000000,
            "Game",
        },
    },
    // 7BCA
    {//背诵
        {//快乐背诵
            0x7F27,
            0x00168000,
            0x00,
            0x00000000,
            "Recite",
        },
        {//艾宾浩斯
            0x7F2A,
            0x00168000,
            0x00,
            0x00000000,
            "Recite",
        },
        {//每日背诵
            0x7F12,
            0x00168000,
            0x00,
            0x00000000,
            "Recite",
        },
        {//考前狂背
            0x7F30,
            0x00168000,
            0x00,
            0x00000000,
            "Recite",
        },
        {
            0x7F2D,
            0x00168000,
            0x00,
            0x00000000,
            "Recite",
        },
    },
    // 7AD2
    {//学习
        {//听写测验
            0x7F1E,
            0x00168000,
            0x00,
            0x00000000,
            "Study",
        },
        {//词汇练习
            0x7F21,
            0x00168000,
            0x00,
            0x00000000,
            "Study",
        },
        {//语法练习
            0x7F24,
            0x00168000,
            0x00,
            0x00000000,
            "Study",
        },
        {//单词练习
            0x7F15,
            0x00168000,
            0x00,
            0x00000000,
            "Study",
        },
        {//国际音标
            0x7F0C,
            0x00168000,
            0x00,
            0x00000000,
            "Study",
        },
        {//英语语法
            0x7F06,
            0x00168000,
            0x00,
            0x00000000,
            "Study",
        },
        {//社交礼仪
            0x7F09,
            0x00168000,
            0x00,
            0x00000000,
            "Study",
        },
        {//英美对照
            0x7F0F,
            0x00168000,
            0x00,
            0x00000000,
            "Study",
        },
    },
    // 774F
    {//资料
        {//唐诗欣赏
            0x7EBE,
            0x00170000,
            0x00,
            0x00000000,
            "Data",
        },
        {//宋词欣赏
            0x7EB8,
            0x00170000,
            0x00,
            0x00000000,
            "Data",
        },
        {//中国文化
            0x7EB2,
            0x00170000,
            0x00,
            0x00000000,
            "Data",
        },
        {//成语故事
            0x7EB5,
            0x00170000,
            0x00,
            0x00000000,
            "Data",
        },
        {//历史年表
            0x7EBB,
            0x00170000,
            0x00,
            0x00000000,
            "Data",
        },
        {//省市简表
            0x7EC1,
            0x00170000,
            0x00,
            0x00000000,
            "Data",
        },
    },
    // 7809
    {//计算
        {//普通计算
            0x7EC4,
            0x00164000,
            0x00,
            0x00000000,
            "Calc",
        },
        {//科学计算
            0x7EC7,
            0x00164000,
            0x00,
            0x00000000,
            "Calc",
        },
        {//单位换算
            0x7ECA,
            0x00164000,
            0x00,
            0x00000000,
            "Calc",
        },
        {//汇率换算
            0x7ECD,
            0x00164000,
            0x00,
            0x00000000,
            "Calc",
        },
        {//公式计算
            0x7ED0,
            0x00164000,
            0x00,
            0x00000000,
            "Calc",
        },
    },
    // 7CA3
    {//存储
        {//下载数据
            0x7F5A,
            0x00160000,
            0x00,
            0x00000000,
            "Game",
        },
        {//用户数据
            0x7F5D,
            0x00160000,
            0x00,
            0x00000000,
            "Game",
        },
        {//其他数据
            0x7F60,
            0x00160000,
            0x00,
            0x00000000,
            "Game",
        },
        {//容量检查
            0x7F63,
            0x00160000,
            0x00,
            0x00000000,
            "Game",
        },
        {//碎片整理
            0x7F66,
            0x00160000,
            0x00,
            0x00000000,
            "Game",
        },
    },
    // 7C65
    {//游戏
        {//Eros方块
            0x7F36,
            0x00164000,
            0x00,
            0x00000000,
            "Game",
        },
    },
    // 7695
    {//下载
        {//电子图书
            0x7EAC,
            0x0015C000,
            0x00,
            0x00000000,
            "Data",
        },
        {//电子资料
            0x7EAF,
            0x0015C000,
            0x00,
            0x00000000,
            "Data",
        },
        {//接收资料
            0x7EA3,
            0x0015C000,
            0x00,
            0x00000000,
            "Com",
        },
        {//发送资料
            0x7EA0,
            0x0015C000,
            0x00,
            0x00000000,
            "Com",
        },
        {//资料备份
            0x7EA6,
            0x0015C000,
            0x00,
            0x00000000,
            "Com",
        },
        {//资料恢复
            0x7EA9,
            0x0015C000,
            0x00,
            0x00000000,
            "Com",
        },
    },
    // 7350
    {//工具
        {//开机设置
            0x7E52,
            0x00160000,
            0x00,
            0x00000000,
            "System",
        },
        {//系统设置
            0x7F54,
            0x00030000,
            0x00,
            0x00000000,
            "System",
        },
        {//备忘记事
            0x7F57,
            0x00030000,
            0x00,
            0x00000000,
            "System",
        },
        {//时间助手
            0x7F51,
            0x00030000,
            0x00,
            0x00000000,
            "System",
        },
        {//名片
            0x7E91,
            0x0015C000,
            0x00,
            0x00000000,
            "Memo",
        },
        {
            0x7E6D,
            0x00158000,
            0x00,
            0x00000000,
            "Time",
        },
        {//闹钟
            0x7E73,
            0x00158000,
            0x00,
            0x00000000,
            "Time",
        },
        {
            0x7E43,
            0x00160000,
            0x00,
            0x00000000,
            "System",
        },
        {
            0x7E46,
            0x00160000,
            0x00,
            0x00000000,
            "System",
        },
        {
            0x7E4C,
            0x00160000,
            0x00,
            0x00000000,
            "System",
        },
        {
            0x7E4F,
            0x00160000,
            0x00,
            0x00000000,
            "System",
        },
        {
            0x7E49,
            0x00160000,
            0x00,
            0x00000000,
            "System",
        },
        {
            0x7E58,
            0x00160000,
            0x00,
            0x00000000,
            "System",
        },
        {
            0x7E5B,
            0x00160000,
            0x00,
            0x00000000,
            "System",
        },
        {
            0x7E5E,
            0x00160000,
            0x00,
            0x00000000,
            "System",
        },
        {
            0x7E61,
            0x00160000,
            0x00,
            0x00000000,
            "System",
        },
        {
            0x7E67,
            0x00160000,
            0x00,
            0x00000000,
            "System",
        },
        {
            0x7E70,
            0x00158000,
            0x00,
            0x00000000,
            "Time",
        },
        {
            0x7E82,
            0x00158000,
            0x00,
            0x00000000,
            "Time",
        },
        {
            0x7E7F,
            0x00158000,
            0x00,
            0x00000000,
            "Time",
        },
        {
            0x7E85,
            0x00158000,
            0x00,
            0x00000000,
            "Time",
        },
        {
            0x7E76,
            0x00158000,
            0x00,
            0x00000000,
            "Time",
        },
        {
            0x7E7C,
            0x00158000,
            0x00,
            0x00000000,
            "Time",
        },
        {
            0x7E94,
            0x0015C000,
            0x00,
            0x00000000,
            "Memo",
        },
        {
            0x7E97,
            0x0015C000,
            0x00,
            0x00000000,
            "Memo",
        },
        {
            0x7E9D,
            0x0015C000,
            0x00,
            0x00000000,
            "Memo",
        },
        {
            0x7E91,
            0x0015C000,
            0x00,
            0x00000000,
            "Memo",
        },
    },
};

// 00E8416B - 00E84252
void _00E8416B() // main
{
    UINT8 debug[] = "    "; // 0x9000
    U8 _17C5[10];
    while (0x01)
    {
    _5182:
        UINT8 _17CF = SysGetKey();
        if (_17CF != 0xFF)
        {
        _519D:
            _itoa(_17CF, (char*)_17C5, 0x0010);
            SysPrintString(0x00, 0x00, debug);
            SysPrintString(0x00, 0x00, _17C5);
        }
    }
}

// 00E84253 - 00E842C9
void _00E84253()
{
    GuiInit();
    SysLcdPartClear(0x00, 0x00, 0x9E, 0x5F);
    SysLcdPartClear(0x00, 0x00, 0x9E, 0x5F);
    _00E8449B();
}

// 00E842DC - 00E8431B
void _00E842DC()
{
    GuiInit();
    FlashInit();
    GuiSetDefaultHeirApp();
    // 初始化时间到24小时制的2004-10-01 12:00:00
    _00ED1C07();
    _00EACD37();
    SysIconAllClear();
    g_ApoState = 0x01;
}

// 00E8431C - 00E843E0
UINT8 _00E8431C()
{
    UINT8 _17CD = GuiQueryBox(0x01, 0x00, (U8*)"要清内存吗?");
    if (_17CD)
    {
        return _17CD;
    }
    _17CD = GuiQueryBox(0x01, 0x00, (U8*)"真的要清吗?");
    if (_17CD)
    {
        return _17CD;
    }
    ResetFlash();
    return 0x01;
}

// 00E843E1 - 00E8449A
UINT8 _00E843E1(UINT8 _17C6, UINT8 _17C7)
{
    if (_17C6 == 0x09)
    {
        if (_00F2A93A(PSW_GAME) == 0x00)
        {
            return 0x00;
        }
    }
    if (_17C6 == 0x0A)
    {
        if ((_17C7 == 0x00) || (_17C7 == 0x01))
        {
            if (_00F2A93A(PSW_DATA) == 0x00)
            {
                return 0x00;
            }
        }
    }
    if (_17C6 == 0x0B)
    {
        if ((_17C7 == 0x02) || (_17C7 == 0x04))
        {
            if (_00F2A93A(PSW_DATA) == 0x00)
            {
                return 0x00;
            }
        }
    }
    return 0x01;
}

// 00E8449B - 00E8475C
void _00E8449B()
{
    UINT8 _17D1 = 0;
    UINT8 _17D0 = 0;
    _00E842DC();
    _00E84C18(0x00); // 显示是否清除flash
_54B3:
    while (1)
    {
        GuiInit();
        if (g_AppSwitchInfo.heirAppAttr == GUI_APP_TYPE_HOT_APP)
        {
        _54D0:
            _00E84797(&_17D1, &_17D0);
        }
        else if (g_AppSwitchInfo.heirAppAttr == GUI_APP_TYPE_DWN_PRG)
        {
            GuiSetDefaultHeirApp();
            if (_00E843E1(_17D1, _17D0) == 0)
            {
                continue;
            }
            g_AppSwitchInfo.currentAppAttr = GUI_APP_TYPE_DWN_PRG;
            g_AppSwitchInfo.currentAppID = GUI_APP_ID_DOWN_PRG;
            if (_17D1 == 0x03)
            {
                _00F4E9DD(g_AppSwitchInfo.downAppPhyAddr);
            }
            else
            {
                GuiLoadDownApp(g_AppSwitchInfo.downAppPhyAddr);
                GuiStartDownApp();
            }
        }
        else
        {
            if (_17D1 <= 0x0B)
            {
                GuiSetDefaultHeirApp();
                if (_00E843E1(_17D1, _17D0) == 0)
                {
                    continue;
                }
                GuiSetDefaultHeirApp();
                g_AppSwitchInfo.currentAppAttr = GUI_APP_TYPE_NORMAL;
                g_AppSwitchInfo.currentAppID = (UINT16)_17D1 << (0x08 + _17D0);
                if (_17D1 == 0x08)
                {
                    _00F2B3F8();
                }
                //_17D2 = *(UINT16*)(MCU_memory + _17D1 * 2 + 0x7D3E);
                //_17D2 += _17D0 * 0x001F;
                GuiSwitchApp(infos[_17D1] + _17D0, 0x0000, 0x0000);
            }
        }
    }
}

// 00E84797 - 00E84B02
void _00E84797(UINT8* _17CC, UINT8* _17CE)
{
    if (g_AppSwitchInfo.heirAppID == GUI_APP_ID_ON_OFF)
    {
    _57C1:
        GuiSetDefaultHeirApp();
        g_AppSwitchInfo.currentAppAttr = GUI_APP_TYPE_HOT_APP;
        g_AppSwitchInfo.currentAppID = GUI_APP_ID_ON_OFF;
        _00E84C18(0x01);
    }
    else if (g_AppSwitchInfo.heirAppID == GUI_APP_ID_HOME)
    {
    _581F:
        g_AppSwitchInfo.currentAppAttr = GUI_APP_TYPE_HOT_APP;
        g_AppSwitchInfo.currentAppID = GUI_APP_ID_HOME;
        GuiSetDefaultHeirApp();
        AppRunInfoType _71DC = {
            0x7E37,     /* 程序起始的物理地址 */
            0x00030000, /* 数据段的物理存储地址 */
            0x00,       /* 系统内部程序或下载程序 */
            0x00000000, /* 唯一id 号 */
            "GuiShell", /* 名称 */
        };
        GuiSwitchApp(&_71DC, _17CC, _17CE);
    }
    else
    {
        UINT16 _17C8 = g_AppSwitchInfo.heirAppID;
        _17C8 >>= 0x0008;
        *_17CC = _17C8;
        _17C8 = g_AppSwitchInfo.heirAppID & 0x00FF;
        *_17CE = _17C8;
        GuiSetDefaultHeirApp();
        _17C8 = *_17CC;
        if (_00E843E1((UINT8)_17C8, *_17CE))
        {
            _17C8 = *_17CC;
            _17C8 <<= 0x0008;
            _17C8 += *_17CE;
            g_AppSwitchInfo.currentAppID = _17C8;
            g_AppSwitchInfo.currentAppAttr = GUI_APP_TYPE_HOT_APP;
            GuiSetDefaultHeirApp();
            //_17C8 = *(UINT16*)(MCU_memory + ((*_17CC) << 1) + 0x7D3E);
            //_17C8 += (*_17CE) * 0x001F;
            GuiSwitchApp(&infos[*_17CC][*_17CE], 0x0000, 0x0000);
        }
    }
}

// 00E84B03 - 00E84C17
void _00E84B03()
{
    SysLcdPartClear(0x00, 0x00, 0x9E, 0x5F);
    SysPrintString(0x0C, 0x30, (U8*)"正在初始化系统...");
    _00F8B026();
    SysIconNumClear();
    for (UINT8 _17CD = 0x00; _17CD < 0x07; _17CD++)
    {
        GuiInitAppOnReset(_17CD);
    }
    SysIconNumClear();
    SysIconNumber1(0x06);
    SysIconNumber2(0x09);
    SysIconNumber3(0x01);
    _00E9ECB1();
    SysIconNumClear();
}

// 00E84C18 - 00E84DF0
void _00E84C18(UINT8 v)
{
    UINT8 _17CE = 0;
    SysLcdPartClear(0x00, 0x00, 0x9E, 0x5F);
    _00EACD37();
    if (v)
    {
        _17CE = AppPowerOffHelper();
    }
    _00F2A66E();
    while (1)
    {
        _5C9A:
        if (_00F2A93A(PSW_START))
        {
            break;
        }
        else
        {
            _5CB5:
            _17CE = 0x00;
            AppPowerOffHelper();
            GuiSetDefaultHeirApp();
            DictSysFlag &= SYS_FLAG_DELAY_POWER_OFF_NMASK;
            SysLcdPartClear(0x00, 0x00, 0x9E, 0x5F);
        }
    }
    _5D26:
    if (_17CE == 0xFD)
    {
        return;
    }
    _5D35:
    if (v == 0x00)
    {
        _5D44:
        _17CE = _00E8431C();
        _00E84B03();
        if (_17CE == 0xFD)
        {
            return;
        }
    }
    _5D5D:
    _00F2A66E();
    _17CE = GuiTimeDjsMsg();
    if (_17CE == 0xFD)
    {
        return;
    }
_5D86:
    _17CE = GuiTimeJnrMsg();
    if (_17CE == 0xFD)
    {
        return;
    }
_5DA4:
    _17CE = GuiStudyAbhsReciteAwake();
    if (_17CE == 0xFD)
    {
        return;
    }
    _5DC2:
    _17CE = GuiSetKjDisp();
    if (_17CE == 0xFD)
    {
        return;
    }
}

// 00E84DF1 - 00E84E04
void _00E84DF1(UINT8 a)
{
    //__store_char_funct_arg(a); todo
}

// 00E85BF4 - 00E85C65
void GuiWanNianLi()
{
    AppRunInfoType _7239= {
        0x7E40,
        0x00158000,
        0x00,
        0x00000000,
        "GuiHelp",
    };
    GuiSwitchApp(&_7239, 0x0000, 0x0000);
}

// 00E860F8 - 00E86169
void _00E860F8()
{
    AppRunInfoType _7312 = {
        0x7F69,
        0x00030000,
        0x00,
        0x00000000,
        "Recite",
    };
    GuiSwitchApp(&_7312, 0x0000, 0x0000);
}

// 00E8616A - 00E861DB
void _00E8616A()
{
    AppRunInfoType _7331 = {
        0x7E6A,
        0x00160000,
        0x00,
        0x00000000,
        "sys",
    };
    GuiSwitchApp(&_7331, 0x0000, 0x0000);
}

// 00E94000 - 00E9403B
void LCDPowerOff() // LCDInit? LCDPowerOff?
{
    _LCDCON &= 0x7F;
    _PB &= 0xFD;
    _PB &= 0xFE;
    _PA &= 0x7F;
}

// 00E9403C - 00E940C0
void LCDPowerOn(UINT8* _17D0)
{
    _PA |= 0x80;
    _PB |= 0x01;
    _PB |= 0x02;
    _LCDCON |= 0x80;
    // SysCursorReadParam
    _17D0[0] = Cursor_width;
    _17D0[1] = Cursor_high;
    _17D0[2] = Cursor_X;
    _17D0[3] = Cursor_Y;
    _17D0[4] = Cursor_CloseFlag;
}

// 00E94C6D - 00E95179
void _00E94C6D()
{
    if (Lcd_X >= 0x91)
    {
        return;
    }
    if (Lcd_Y >= 0x51)
    {
        return;
    }

    _00E97714();
    if (MCU_memory[0x20AE] >= 0xA1)
    {
    _5C8A:
        if (MCU_memory[0x20AE] < 0xAA)
        {
        _5CA5:
            if (MCU_memory[0x20AD] >= 0xA1)
            {
            _5CB9:
                MultDivOp2 = MCU_memory[0x20AD] - 0xA1 + (MCU_memory[0x20AE] - 0xA1) * 0x5E;
                MultDivOp1 = 0x0020;
                _00E96B73();
                *(UINT32*)(MCU_memory + 0x20AF) = MultDivResult + 0x00034E00 + (MultDivOp1 << 16);
            _5D19:
                goto _5FEF;
            }
            else
            {
            _5CAC:
                if (MCU_memory[0x20AE] < 0xA8)
                {
                _5F8E:
                    MultDivOp2 = MCU_memory[0x20AD] - 0x40 + (MCU_memory[0x20AE] - 0xA1) * 0x61;
                    MultDivOp1 = 0x0020;
                    _00E96B73();
                    *(UINT32*)(MCU_memory + 0x20AF) = MultDivResult + 0x00047800 + (MultDivOp1 << 16);
                _5FEB:
                    goto _5FEF;
                }
                else
                {
                _5E54:
                    *(UINT16*)(MCU_memory + 0x20AF) = (MCU_memory[0x20AE] - 0xA8) * 0x60;
                    UINT8 a = MCU_memory[0x20AD];
                    if (a >= 0x80)
                    {
                        a -= 0x80;
                    }
                    MultDivOp2 = a - 0x40 + *(UINT16*)(MCU_memory + 0x20AF);
                    MultDivOp1 = 0x0020;
                    _00E96B73();
                    *(UINT32*)(MCU_memory + 0x20AF) = MultDivResult + 0x0003BD80 + (MultDivOp1 << 16);
                _5EBE:
                    goto _5FEF;
                }
            }
        }
    _5C8E:
        if (MCU_memory[0x20AD] >= 0xA1)
        {
        _5D1C:
            if (MCU_memory[0x20AE] >= 0xB0)
            {
            _5D26:
                if (MCU_memory[0x20AE] < 0xF8)
                {
                _5D2D:
                    MultDivOp2 = MCU_memory[0x20AD] - 0xA1 + (MCU_memory[0x20AE] - 0xB0) * 0x5E;
                    MultDivOp1 = 0x0020;
                    _00E96B73();
                    *(UINT32*)(MCU_memory + 0x20AF) = MultDivResult + (MultDivOp1 << 16);
                _5D81:
                    goto _5FEF;
                }
                else
                {
                _5F21:
                    MultDivOp2 = MCU_memory[0x20AD] - 0xA1 + (MCU_memory[0x20AE] - 0xF8) * 0x5E;
                    MultDivOp1 = 0x0020;
                    _00E96B73();
                    *(UINT32*)(MCU_memory + 0x20AF) = MultDivResult + 0x000425C0 + (MultDivOp1 << 16);
                _5F7E:
                    goto _5FEF;
                }
            }
            else
            {
            _5EC1:
                MultDivOp2 = MCU_memory[0x20AD] - 0xA1 + (MCU_memory[0x20AE] - 0xAA) * 0x5E;
                MultDivOp1 = 0x0020;
                _00E96B73();
                *(UINT32*)(MCU_memory + 0x20AF) = MultDivResult + 0x0003DF40 + (MultDivOp1 << 16);
            _5F1E:
                goto _5FEF;
            }
        }
    _5C98:
        if (MCU_memory[0x20AE] < 0xDA)
        {
        _5DF1:
            MultDivOp2 = MCU_memory[0x20AD] - 0x40 + (MCU_memory[0x20AE] - 0xAA) * 0x61;
            MultDivOp1 = 0x0020;
            _00E96B73();
            *(UINT32*)(MCU_memory + 0x20AF) = MultDivResult + 0x0008D3A3 + (MultDivOp1 << 16);
        _5E51:
            goto _5FEF;
        }
        else
        {
            MCU_memory[0x20AE] = 0xA1;
            MCU_memory[0x20AD] = 0xA1;
            goto _5CB9;
        }
    }
    else
    {
        MCU_memory[0x20AE] = 0xA1;
        MCU_memory[0x20AD] = 0xA1;
        goto _5CB9;
    }

_5FEF:
    MCU_memory[0x20B1] += 0x80; // MCU_memory[0x3E7];
    _ADDR4L = MCU_memory[0x20AF];
    _ADDR4M = MCU_memory[0x20B0];
    _ADDR4H = MCU_memory[0x20B1];
    buff_point = LcdBuff;
    Parameter0 = 0x20;
    for (UINT8 i = 0x00; i < Parameter0; i++)
    {
        buff_point[i] = font_emu_read(ZKOffsetAddr + i);
    }
    Residue = Lcd_X & 0x07;
    buff_point = LcdBuff;
    UINT8 x = 0x00;
    for (;;)
    {
        if (x == 0x20)
        {
            return;
        }
        MCU_memory[0x20B3] = buff_point[x];
        MCU_memory[0x20B4] = buff_point[x + 1];
        MCU_memory[0x20B5] = 0x00;
        UINT8 y = Residue;
        Ram_Temp = 0x00;
        Ram_Temp2 = 0xFF;
        while (y)
        {
            UINT32 tmp = (MCU_memory[0x20B3] << 16) + (MCU_memory[0x20B4] << 8) + MCU_memory[0x20B5];
            tmp >>= 1;
            MCU_memory[0x20B3] = tmp >> 16;
            MCU_memory[0x20B4] = tmp >> 8;
            MCU_memory[0x20B5] = tmp;
            Ram_Temp = (0x100 + Ram_Temp) >> 1;
            Ram_Temp2 >>= 1;
            y--;
        }
        if (Lcd_X == 0x90)
        {
        _6150:
            *Ram_Point2 = (*Ram_Point2 & Ram_Temp) | MCU_memory[0x20B3];
            Ram_Temp2 = MCU_memory[0x20B4] & 0xFE;
            Ram_Point2[1] = (Ram_Point2[1] & 0x01) | Ram_Temp2;
            _00E955FB();
            Lcd_Y++;
            x += 2;
        }
        else if (Lcd_X < 0x08)
        {
        _60EE:
            *Ram_Point1 = (*Ram_Point1 & Ram_Temp) | MCU_memory[0x20B3];
            if ((Lcd_RamMapAddressMove == 0x01) && (Ram_Point2 == MCU_memory + Lcd_RamMapOldAddress))
            {
            _6111:
                Ram_Point2 = MCU_memory + Lcd_RamMapNewAddress;
                *Ram_Point2 = MCU_memory[0x20B4];
                Ram_Point2 = MCU_memory + Lcd_RamMapOldAddress;
            }
            else
            {
                *Ram_Point2 = MCU_memory[0x20B4];
            }
        _613A:
            Ram_Point2[1] = (Ram_Point2[1] & Ram_Temp2) | MCU_memory[0x20B5];
            _00E955FB();
            Lcd_Y++;
            x += 2;
        }
        else
        {
        _6088:
            if ((Lcd_RamMapAddressMove == 0x01) && (Ram_Point2 == MCU_memory + Lcd_RamMapOldAddress))
            {
            _609F:
                Ram_Point2 = MCU_memory + Lcd_RamMapNewAddress;
                *Ram_Point2 = (*Ram_Point2 & Ram_Temp) | MCU_memory[0x20B3];
                Ram_Point2 = MCU_memory + Lcd_RamMapOldAddress;
            }
            else
            {
                *Ram_Point2 = (*Ram_Point2 & Ram_Temp) | MCU_memory[0x20B3];
            }
        _60D2:
            Ram_Point2[1] = MCU_memory[0x20B4];
            Ram_Point2[2] = (Ram_Point2[2] & Ram_Temp2) | MCU_memory[0x20B5];
            _00E955FB();
            Lcd_Y++;
            x += 2;
        }
    }
}

// 00E95190 - 00E95373
void _00E95190()
{
    if ((Lcd_X < 0x99) && (Lcd_Y < 0x51))
    {
        MultDivOp2 = MCU_memory[0x20AD] - 0xA1 + (MCU_memory[0x20AE] - 0xF8) * 0x5E;
        MultDivOp1 = 0x0020;
        _00E96B73();
        *(UINT32*)(MCU_memory + 0x20AF) = MultDivResult + 0x000425C0 + ((MultDivOp1 + 0x0004) << 16);
        MCU_memory[0x20B1] += 0x80; // MCU_memory[0x3E7];
        _ADDR4L = MCU_memory[0x20AF];
        _ADDR4M = MCU_memory[0x20B0];
        _ADDR4H = MCU_memory[0x20B1];
        buff_point = LcdBuff;
        Parameter0 = 0x20;
        for (UINT8 i = 0x00; i < Parameter0; i++)
        {
            buff_point[i] = font_emu_read(ZKOffsetAddr + i);
        }
        Residue = Lcd_X & 0x07;
        _00E97714();
        buff_point = LcdBuff;
        UINT8 x = 0x00;
        for (;;)
        {
            if (x == 0x20)
            {
                return;
            }
            UINT8 y = x;
            MCU_memory[0x20B3] = buff_point[y];
            MCU_memory[0x20B4] = 0x00;
            y = Residue;
            Ram_Temp = 0x00;
            Ram_Temp2 = 0xFF;
            while (y)
            {
                *(UINT16*)(MCU_memory + 0x20B3) >>= 1;
                UINT32 tmp = (0x10000 + (Ram_Temp << 8) + Ram_Temp2) >> 1;
                Ram_Temp = tmp >> 8;
                Ram_Temp2 = tmp;
                y--;
            }
            if (Lcd_X == 0x98)
            {
                Ram_Temp2 = MCU_memory[0x20B3] & 0xFE;
                *Ram_Point2 = (*Ram_Point2 & 0x01) | Ram_Temp2;
                _00E955FB();
                Lcd_Y++;
                x += 2;
            }
            else if (Lcd_X < 0x08)
            {
                *Ram_Point1 = (*Ram_Point1 & Ram_Temp) | MCU_memory[0x20B3];
                if ((Lcd_RamMapAddressMove == 0x01) && (Ram_Point2 == MCU_memory + Lcd_RamMapOldAddress))
                {
                    Ram_Point2 = MCU_memory + Lcd_RamMapNewAddress;
                    *Ram_Point2 = (*Ram_Point2 & Ram_Temp2) | MCU_memory[0x20B4];
                    Ram_Point2 = MCU_memory + Lcd_RamMapOldAddress;
                }
                else
                {
                    *Ram_Point2 = (*Ram_Point2 & Ram_Temp2) | MCU_memory[0x20B4];
                }
                _00E955FB();
                Lcd_Y++;
                x += 2;
            }
            else
            {
                if ((Lcd_RamMapAddressMove == 0x01) && (Ram_Point2 == MCU_memory + Lcd_RamMapOldAddress))
                {
                    Ram_Point2 = MCU_memory + Lcd_RamMapNewAddress;
                    *Ram_Point2 = (*Ram_Point2 & Ram_Temp) | MCU_memory[0x20B3];
                    Ram_Point2 = MCU_memory + Lcd_RamMapOldAddress;
                }
                else
                {
                    *Ram_Point2 = (*Ram_Point2 & Ram_Temp) | MCU_memory[0x20B3];
                }
                Ram_Point2[1] = (Ram_Point2[1] & Ram_Temp2) | MCU_memory[0x20B4];
                _00E955FB();
                Lcd_Y++;
                x += 2;
            }
        }
    }
}

// 00E95374 - 00E955FA
void _00E95374(U8 x, U8 y, U8 asc)
{
    MCU_memory[0x20EF] = 0x01;
    Lcd_X = x;
    Lcd_Y = y;
    MCU_memory[0x20AD] = asc;
    if (Lcd_X >= 0x99)
    {
        return;
    }
    if (Lcd_Y >= 0x51)
    {
        return;
    }

    *(UINT16*)(MCU_memory + 0x20AF) = MCU_memory[0x20AD] * 0x10;
    MCU_memory[0x20B1] = 0x00;
    UINT32 tmp32 = *(UINT32*)(MCU_memory + 0x20AF) + 0x08B363;
    MCU_memory[0x20AF] = tmp32;
    MCU_memory[0x20B0] = tmp32 >> 8;
    MCU_memory[0x20B1] = tmp32 >> 16;
    if (MCU_memory[0x20EF])
    {
        tmp32 = *(UINT32*)(MCU_memory + 0x20AF) + 0x000810;
        MCU_memory[0x20AF] = tmp32;
        MCU_memory[0x20B0] = tmp32 >> 8;
        MCU_memory[0x20B1] = tmp32 >> 16;
        if (MCU_memory[0x20EF] != 0x01)
        {
            tmp32 = *(UINT32*)(MCU_memory + 0x20AF) + 0x000810;
            MCU_memory[0x20AF] = tmp32;
            MCU_memory[0x20B0] = tmp32 >> 8;
            MCU_memory[0x20B1] = tmp32 >> 16;
            if (MCU_memory[0x20EF] != 0x02)
            {
                tmp32 = *(UINT32*)(MCU_memory + 0x20AF) + 0x000810;
                MCU_memory[0x20AF] = tmp32;
                MCU_memory[0x20B0] = tmp32 >> 8;
                MCU_memory[0x20B1] = tmp32 >> 16;
                if (MCU_memory[0x20EF] != 0x03)
                {
                    tmp32 = *(UINT32*)(MCU_memory + 0x20AF) + 0x001830;
                    MCU_memory[0x20AF] = tmp32;
                    MCU_memory[0x20B0] = tmp32 >> 8;
                    MCU_memory[0x20B1] = tmp32 >> 16;
                }
            }
        }
    }
_6471:
    MCU_memory[0x20B1] += 0x80; // MCU_memory[0x3E7];
    _ADDR4L = MCU_memory[0x20AF];
    _ADDR4M = MCU_memory[0x20B0];
    _ADDR4H = MCU_memory[0x20B1];
    buff_point = LcdBuff;
    Parameter0 = 0x10;
    for (UINT8 i = 0x00; i < Parameter0; i++)
    {
        buff_point[i] = font_emu_read(ZKOffsetAddr + i);
    }
    Residue = Lcd_X & 0x07;
    _00E97714();
    for (UINT8 x = 0x00; x != 0x10; x++)
    {
        MCU_memory[0x20B3] = LcdBuff[x];
        MCU_memory[0x20B4] = 0x00;
        y = Residue;
        Ram_Temp_16 = 0xFF00;
        while (y)
        {
            UINT32 tmp32 = (MCU_memory[0x20B3] << 24) + (MCU_memory[0x20B4] << 16) + (Ram_Temp << 8) + Ram_Temp2;
            tmp32 >>= 1;
            MCU_memory[0x20B3] = tmp32 >> 24;
            MCU_memory[0x20B4] = tmp32 >> 16;
            Ram_Temp = tmp32 >> 8;
            Ram_Temp2 = tmp32;
            y--;
        }
    _64F4:
        if (Lcd_X != 0x98)
        {
        _64FE:
            if (Lcd_X >= 0x08)
            {
            _6505:
                if ((Lcd_RamMapAddressMove == 0x01) && (Ram_Point2 == MCU_memory + Lcd_RamMapOldAddress))
                {
                _651C:
                    Ram_Point2 = MCU_memory + Lcd_RamMapNewAddress;
                    *Ram_Point2 = (*Ram_Point2 & Ram_Temp) | MCU_memory[0x20B3];
                    Ram_Point2 = MCU_memory + Lcd_RamMapOldAddress;
                    Ram_Point2[1] = (Ram_Point2[1] & Ram_Temp2) | MCU_memory[0x20B4];
                    _00E955FB();
                    Lcd_Y++;
                }
                else
                {
                _6555:
                    *Ram_Point2 = (*Ram_Point2 & Ram_Temp) | MCU_memory[0x20B3];
                    Ram_Point2[1] = (Ram_Point2[1] & Ram_Temp2) | MCU_memory[0x20B4];
                    _00E955FB();
                    Lcd_Y++;
                }
            }
            else
            {
            _6576:
                *Ram_Point1 = (*Ram_Point1 & Ram_Temp) | MCU_memory[0x20B3];
                if ((Lcd_RamMapAddressMove == 0x01) && (Ram_Point2 == MCU_memory + Lcd_RamMapOldAddress))
                {
                _6599:
                    Ram_Point2 = MCU_memory + Lcd_RamMapNewAddress;
                    *Ram_Point2 = (*Ram_Point2 & Ram_Temp2) | MCU_memory[0x20B4];
                    _00E955FB();
                    Lcd_Y++;
                }
                else
                {
                _65C7:
                    *Ram_Point2 = (*Ram_Point2 & Ram_Temp2) | MCU_memory[0x20B4];
                    _00E955FB();
                    Lcd_Y++;
                }
            }
        }
        else
        {
        _65DD:
            Ram_Temp2 = MCU_memory[0x20B3] & 0xFE;
            *Ram_Point2 = (*Ram_Point2 & 0x01) | Ram_Temp2;
            _00E955FB();
            Lcd_Y++;
        }
    }
}

// 00E953A4 - 00E955FA
void _00E953A4()
{
    MCU_memory[0x20EF] = 0x00;
    if (Lcd_X >= 0x99)
    {
        return;
    }
    if (Lcd_Y >= 0x51)
    {
        return;
    }

    *(UINT16*)(MCU_memory + 0x20AF) = MCU_memory[0x20AD] * 0x10;
    MCU_memory[0x20B1] = 0x00;
    UINT32 tmp = *(UINT32*)(MCU_memory + 0x20AF) + 0x08B363;
    MCU_memory[0x20AF] = tmp;
    MCU_memory[0x20B0] = tmp >> 8;
    MCU_memory[0x20B1] = tmp >> 16;
    if (MCU_memory[0x20EF])
    {
        tmp = *(UINT32*)(MCU_memory + 0x20AF) + 0x000810;
        MCU_memory[0x20AF] = tmp;
        MCU_memory[0x20B0] = tmp >> 8;
        MCU_memory[0x20B1] = tmp >> 16;
        if (MCU_memory[0x20EF] != 0x01)
        {
            tmp = *(UINT32*)(MCU_memory + 0x20AF) + 0x000810;
            MCU_memory[0x20AF] = tmp;
            MCU_memory[0x20B0] = tmp >> 8;
            MCU_memory[0x20B1] = tmp >> 16;
            if (MCU_memory[0x20EF] != 0x02)
            {
                tmp = *(UINT32*)(MCU_memory + 0x20AF) + 0x000810;
                MCU_memory[0x20AF] = tmp;
                MCU_memory[0x20B0] = tmp >> 8;
                MCU_memory[0x20B1] = tmp >> 16;
                if (MCU_memory[0x20EF] != 0x03)
                {
                    tmp = *(UINT32*)(MCU_memory + 0x20AF) + 0x001830;
                    MCU_memory[0x20AF] = tmp;
                    MCU_memory[0x20B0] = tmp >> 8;
                    MCU_memory[0x20B1] = tmp >> 16;
                }
            }
        }
    }
_6471:
    MCU_memory[0x20B1] += 0x80; // MCU_memory[0x3E7];
    _ADDR4L = MCU_memory[0x20AF];
    _ADDR4M = MCU_memory[0x20B0];
    _ADDR4H = MCU_memory[0x20B1];
    buff_point = LcdBuff;
    Parameter0 = 0x10;
    for (UINT8 i = 0x00; i < Parameter0; i++)
    {
        buff_point[i] = font_emu_read(ZKOffsetAddr + i);
    }
    Residue = Lcd_X & 0x07;
    buff_point = LcdBuff;
    _00E97714();
    UINT8 x = 0x00;
    for (;;)
    {
        if (x == 0x10)
        {
            return;
        }
        MCU_memory[0x20B3] = buff_point[x];
        MCU_memory[0x20B4] = 0x00;
        UINT8 y = Residue;
        Ram_Temp = 0x00;
        Ram_Temp2 = 0xFF;
        while (y)
        {
            UINT32 tmp = ((MCU_memory[0x20B3] << 8) + MCU_memory[0x20B4]) >> 1;
            MCU_memory[0x20B3] = tmp >> 8;
            MCU_memory[0x20B4] = tmp;
            Ram_Temp = (0x100 + Ram_Temp) >> 1;
            Ram_Temp2 >>= 1;
            y--;
        }
    _64F4:
        if (Lcd_X == 0x98)
        {
        _65DD:
            Ram_Temp2 = MCU_memory[0x20B3] & 0xFE;
            *Ram_Point2 = (*Ram_Point2 & 0x01) | Ram_Temp2;
            _00E955FB();
            Lcd_Y++;
            x++;
        }
        else if (Lcd_X < 0x08)
        {
        _6576:
            *Ram_Point1 = (*Ram_Point1 & Ram_Temp) | MCU_memory[0x20B3];
            if ((Lcd_RamMapAddressMove == 0x01) && (Ram_Point2 == MCU_memory + Lcd_RamMapOldAddress))
            {
                Ram_Point2 = MCU_memory + Lcd_RamMapNewAddress;
                *Ram_Point2 = (*Ram_Point2 & Ram_Temp2) | MCU_memory[0x20B4];
                Ram_Point2 = MCU_memory + Lcd_RamMapOldAddress;
                _00E955FB();
                Lcd_Y++;
                x++;
            }
            else
            {
            _65C7:
                *Ram_Point2 = (*Ram_Point2 & Ram_Temp2) | MCU_memory[0x20B4];
                _00E955FB();
                Lcd_Y++;
                x++;
            }
        }
        else
        {
        _6505:
            if ((Lcd_RamMapAddressMove == 0x01) && (Ram_Point2 == MCU_memory + Lcd_RamMapOldAddress))
            {
                Ram_Point2 = MCU_memory + Lcd_RamMapNewAddress;
                *Ram_Point2 = (*Ram_Point2 & Ram_Temp) | MCU_memory[0x20B3];
                Ram_Point2 = MCU_memory + Lcd_RamMapOldAddress;
                Ram_Point2[1] = (Ram_Point2[1] & Ram_Temp2) | MCU_memory[0x20B4];
                _00E955FB();
                Lcd_Y++;
                x++;
            }
            else
            {
            _6555:
                *Ram_Point2 = (*Ram_Point2 & Ram_Temp) | MCU_memory[0x20B3];
                Ram_Point2[1] = (Ram_Point2[1] & Ram_Temp2) | MCU_memory[0x20B4];
                _00E955FB();
                Lcd_Y++;
                x++;
            }
        }
    }
}

// 00E955FB - 00E956B1
void _00E955FB()
{
    if (Lcd_Y < 0x40)
    {
        _662D:
        Ram_Point2 -= 0x0020;
        Ram_Point1 -= 0x0020;
    }
    else if (Lcd_Y == 0x40)
    {
        _6650:
        Ram_Point2 -= 0x0020;
        Ram_Point1 = MCU_memory + 0x0FF3;
    }
    else if (Lcd_Y == 0x41)
    {
        _666C:
        Ram_Point1 = MCU_memory + 0x0C33;
        Ram_Point2 = MCU_memory + 0x0C40;
        if (Lcd_X >= 0x08)
        {
            _6688:
            Var_Ram_Addr = Lcd_X - 0x08;
            while (Var_Ram_Addr >= 0x08)
            {
                _669A:
                Var_Ram_Addr -= 0x08;
                Ram_Point2 += 0x0001;
            }
        }
    }
    else if (Lcd_Y > 0x41)
    {
        _660A:
        Ram_Point2 += 0x0020;
        Ram_Point1 += 0x0020;
    }
}
// 00E96B73 - 00E96BA6
// (MultDivOp1<<16)+MultDivResult<=MultDivOp1*MultDivOp2
// Mult_16U
void _00E96B73()
{
    MultDivResult = 0x0000;
    UINT8 y = 0x10;
    do
    {
        UINT32 tmp = MultDivResult + (MultDivOp1 << 16);
        UINT32 flag = tmp & 0x80000000;
        tmp <<= 1;
        MultDivResult = tmp;
        MultDivOp1 = tmp >> 16;
        if (flag)
        {
            _7B8B:
            tmp = MultDivOp2 + MultDivResult;
            flag = tmp & 0x80000000;
            MultDivResult = tmp;
            if (flag)
            {
                MCU_memory[0x2085]++;
            }
        }
    _7BA3:
        y--;
    } while (y);
}

// 00E96BD2 - 00E96BF3
// (MCU_memory[0x2085]<<8)+MCU_memory[0x2089]<=MCU_memory[0x2087]*MCU_memory[0x2085]
// Mult_8U
void _00E96BD2() // 字节码同_00E99C85
{
    MCU_memory[0x2089] = 0x00;
    for (UINT8 y = 0x08; y > 0; y--)
    {
        UINT8 tmp = MCU_memory[0x2085] & 0x80;
        MCU_memory[0x2085] = (MCU_memory[0x2085] << 1) + (MCU_memory[0x2089] >> 7);
        MCU_memory[0x2089] <<= 1;
        if (tmp)
        {
            UINT16 tmp16 = (UINT16)MCU_memory[0x2087] + (UINT16)MCU_memory[0x2089];
            MCU_memory[0x2089] = tmp16 & 0xFF;
            if (tmp16)
            {
                MCU_memory[0x2085] += 1;
            }
        }
    }
}

// 00E96E4A - 00E97101
void SysHorizontalLine(UINT8 x0, UINT8 x1, UINT8 y)
{
    Line_X0 = x0;
    Line_X1 = x1;
    Line_Y0 = y;

    if (Line_X0 >= Line_X1)
    {
        UINT8 x = Line_X0;
        Line_X0 = Line_X1;
        Line_X1 = x;
    }
_7E6E:
    if (Line_X0 >= LcdWidth)
    {
        return;
    }
    if (Line_X1 >= LcdWidth)
    {
        return;
    }
    if (Line_Y0 >= LcdHigh)
    {
        return;
    }
_7E86:
    Lcd_X = Line_X0;
    Lcd_Y = Line_Y0;
    _00E97714();
    Ram_Temp4 = Line_X0 & 0x07;
    Lcd_Temp = 0xFF;
    UINT8 x = Ram_Temp4;
    if (x)
    {
    _7EA9:
        do
        {
            Lcd_Temp >>= 1;
            x--;
        } while (x);
    }
    else
    {
    _7EB5:
        Lcd_Temp = 0xFF;
    }
_7EBA:
    Lcd_Temp2 = Line_X1 & 0x07;
    x = 0x07 - Lcd_Temp2;
    Lcd_Temp2 = 0xFF;
    if (x)
    {
        do
        {
        _7ED2:
            Lcd_Temp2 <<= 1;
            x--;
        } while (x);
    }
    else
    {
    _7EDE:
        Lcd_Temp2 = 0xFF;
    }
_7EE3:
    Ram_Temp = Line_X0 >> 3;
    Ram_Temp2 = Line_X1 >> 3;
    if (Ram_Temp2 < Ram_Temp)
    {
    _7F1A:
        return;
    }
_7EFE:
    MCU_memory[0x20D8] = Ram_Temp2 - Ram_Temp;
    Ram_Temp3 = 0x00;
    if (Line_Y0 == 0x41)
    {
    _7F10:
        if (Line_X0 < 0x08)
        {
        _7F1B:
            Ram_Temp3 = 0x01;
            if (MCU_memory[0x20D8])
            {
            _7F2A:
                *Ram_Point1 |= Lcd_Temp;
                MCU_memory[0x20D8]--;
                if (MCU_memory[0x20D8])
                {
                    goto _7FE2;
                }
                goto _8037;
            }
            goto _807C;
        }
        goto _7F74;
    }
    else
    {
    _7F44:
        if (Line_X0 < 0x08)
        {
        _7F4B:
            Ram_Temp3 = 0x03;
            if (MCU_memory[0x20D8])
            {
            _7F5A:
                *Ram_Point1 |= Lcd_Temp;
                MCU_memory[0x20D8]--;
                if (MCU_memory[0x20D8])
                {
                    goto _7FE2;
                }
                goto _8037;
            }
            goto _807C;
        }
        goto _7F74;
    }

_7F74:
    Ram_Temp3 = 0x04;
    if (MCU_memory[0x20D8])
    {
    _7F83:
        if ((Lcd_RamMapAddressMove == 0x01) && (Ram_Point2 == MCU_memory + Lcd_RamMapOldAddress))
        {
        _7F9A:
            Ram_Point2 = MCU_memory + Lcd_RamMapNewAddress;
            *Ram_Point2 |= Lcd_Temp;
            Ram_Point2 = MCU_memory + Lcd_RamMapOldAddress;
        }
        else
        {
        _7FBE:
            *Ram_Point2 |= Lcd_Temp;
        }
    _7FC7:
        Ram_Point2 += 1;
        MCU_memory[0x20D8]--;
        if (MCU_memory[0x20D8])
        {
        _7FE2:
            if ((Lcd_RamMapAddressMove == 0x01) && (Ram_Point2 == MCU_memory + Lcd_RamMapOldAddress))
            {
            _7FF9:
                Ram_Point2 = MCU_memory + Lcd_RamMapNewAddress;
                *Ram_Point2 = 0xFF;
                Ram_Point2 = MCU_memory + Lcd_RamMapOldAddress;
            }
            else
            {
            _8018:
                *Ram_Point2 = 0xFF;
            }
        _801C:
            Ram_Point2 += 1;
            MCU_memory[0x20D8]--;
            if (MCU_memory[0x20D8])
            {
                goto _7FE2;
            }
        }
    _8037:
        if ((Lcd_RamMapAddressMove == 0x01) && (Ram_Point2 == MCU_memory + Lcd_RamMapOldAddress))
        {
        _804E:
            Ram_Point2 = MCU_memory + Lcd_RamMapNewAddress;
            *Ram_Point2 |= Lcd_Temp2;
            Ram_Point2 = MCU_memory + Lcd_RamMapOldAddress;
        }
        else
        {
        _8072:
            *Ram_Point2 |= Lcd_Temp2;
        }
    }
    else
    {
    _807C:
        Lcd_Temp |= Lcd_Temp2;
        if (Ram_Temp3 == 0x03)
        {
        _80AE:
            *Ram_Point1 |= Lcd_Temp;
        }
        else if ((Ram_Temp3 == 0x02) || (Ram_Temp3 == 0x04))
        {
        _80BA:
            if ((Lcd_RamMapAddressMove == 0x01) && (Ram_Point2 == MCU_memory + Lcd_RamMapOldAddress))
            {
            _80D1:
                Ram_Point2 = MCU_memory + Lcd_RamMapNewAddress;
                *Ram_Point2 |= Lcd_Temp;
                Ram_Point2 = MCU_memory + Lcd_RamMapOldAddress;
            }
            else
            {
            _80F5:
                *Ram_Point2 |= Lcd_Temp;
            }
        }
        else
        {  // if (Ram_Temp3 == 0x01)
        _8098:
            *Ram_Point1 |= Lcd_Temp;
            Ram_Point1 = MCU_memory + 0x03F3;
        }
    }
}

// 00E96E5A - 00E97101
void _00E96E5A()
{
    if (Line_X0 >= Line_X1)
    {
        UINT8 x = Line_X0;
        Line_X0 = Line_X1;
        Line_X1 = x;
    }
_7E6E:
    if (Line_X0 >= LcdWidth)
    {
        return;
    }
    if (Line_X1 >= LcdWidth)
    {
        return;
    }
    if (Line_Y0 >= LcdHigh)
    {
        return;
    }
    _7E86:
    Lcd_X = Line_X0;
    Lcd_Y = Line_Y0;
    _00E97714();
    Ram_Temp4 = Line_X0 & 0x07;
    Lcd_Temp = 0xFF;
    UINT8 x = Ram_Temp4;
    if (x)
    {
    _7EA9:
        do
        {
            Lcd_Temp >>= 1;
            x--;
        } while (x);
    }
    else
    {
    _7EB5:
        Lcd_Temp = 0xFF;
    }
    _7EBA:
    Lcd_Temp2 = Line_X1 & 0x07;
    x = 0x07 - Lcd_Temp2;
    Lcd_Temp2 = 0xFF;
    if (x)
    {
        do
        {
        _7ED2:
            Lcd_Temp2 <<= 1;
            x--;
        } while (x);
    }
    else
    {
    _7EDE:
        Lcd_Temp2 = 0xFF;
    }
_7EE3:
    Ram_Temp = Line_X0 >> 3;
    Ram_Temp2 = Line_X1 >> 3;
    if (Ram_Temp2 < Ram_Temp)
    {
    _7F1A:
        return;
    }
_7EFE:
    MCU_memory[0x20D8] = Ram_Temp2 - Ram_Temp;
    Ram_Temp3 = 0x00;
    if (Line_Y0 == 0x41)
    {
    _7F10:
        if (Line_X0 < 0x08)
        {
        _7F1B:
            Ram_Temp3 = 0x01;
            if (MCU_memory[0x20D8])
            {
            _7F2A:
                *Ram_Point1 |= Lcd_Temp;
                MCU_memory[0x20D8]--;
                if (MCU_memory[0x20D8])
                {
                    goto _7FE2;
                }
                goto _8037;
            }
            goto _807C;
        }
        goto _7F74;
    }
    else
    {
    _7F44:
        if (Line_X0 < 0x08)
        {
            _7F4B:
            Ram_Temp3 = 0x03;
            if (MCU_memory[0x20D8])
            {
                _7F5A:
                *Ram_Point1 |= Lcd_Temp;
                MCU_memory[0x20D8]--;
                if (MCU_memory[0x20D8])
                {
                    goto _7FE2;
                }
                goto _8037;
            }
            goto _807C;
        }
        goto _7F74;
    }

    _7F74:
    Ram_Temp3 = 0x04;
    if (MCU_memory[0x20D8])
    {
    _7F83:
        if ((Lcd_RamMapAddressMove == 0x01) && (Ram_Point2 == MCU_memory + Lcd_RamMapOldAddress))
        {
        _7F9A:
            Ram_Point2 = MCU_memory + Lcd_RamMapNewAddress;
            *Ram_Point2 |= Lcd_Temp;
            Ram_Point2 = MCU_memory + Lcd_RamMapOldAddress;
        }
        else
        {
        _7FBE:
            *Ram_Point2 |= Lcd_Temp;
        }
    _7FC7:
        Ram_Point2 += 1;
        MCU_memory[0x20D8]--;
        if (MCU_memory[0x20D8])
        {
            _7FE2:
            if ((Lcd_RamMapAddressMove == 0x01) && (Ram_Point2 == MCU_memory + Lcd_RamMapOldAddress))
            {
                _7FF9:
                Ram_Point2 = MCU_memory + Lcd_RamMapNewAddress;
                *Ram_Point2 = 0xFF;
                Ram_Point2 = MCU_memory + Lcd_RamMapOldAddress;
            }
            else
            {
            _8018:
                *Ram_Point2 = 0xFF;
            }
            _801C:
            Ram_Point2 += 1;
            MCU_memory[0x20D8]--;
            if (MCU_memory[0x20D8])
            {
                goto _7FE2;
            }
        }
        _8037:
        if ((Lcd_RamMapAddressMove == 0x01) && (Ram_Point2 == MCU_memory + Lcd_RamMapOldAddress))
        {
            _804E:
            Ram_Point2 = MCU_memory + Lcd_RamMapNewAddress;
            *Ram_Point2 |= Lcd_Temp2;
            Ram_Point2 = MCU_memory + Lcd_RamMapOldAddress;
        }
        else
        {
            _8072:
            *Ram_Point2 |= Lcd_Temp2;
        }
    }
    else
    {
    _807C:
        Lcd_Temp |= Lcd_Temp2;
        if (Ram_Temp3 == 0x03)
        {
            _80AE:
            *Ram_Point1 |= Lcd_Temp;
        }
        else if ((Ram_Temp3 == 0x02) || (Ram_Temp3 == 0x04))
        {
            _80BA:
            if ((Lcd_RamMapAddressMove == 0x01) && (Ram_Point2 == MCU_memory + Lcd_RamMapOldAddress))
            {
                _80D1:
                Ram_Point2 = MCU_memory + Lcd_RamMapNewAddress;
                *Ram_Point2 |= Lcd_Temp;
                Ram_Point2 = MCU_memory + Lcd_RamMapOldAddress;
            }
            else
            {
                _80F5:
                *Ram_Point2 |= Lcd_Temp;
            }
        }
        else
        {  // if (Ram_Temp3 == 0x01)
        _8098:
            *Ram_Point1 |= Lcd_Temp;
            Ram_Point1 = MCU_memory + 0x03F3;
        }
    }
}

// 00E97324 - 00E97529
void _00E97324()
{
    if (Line_X0 >= Line_X1)
    {
        UINT8 y = Line_X0;
        Line_X0 = Line_X1;
        Line_X1 = y;
        y = Line_Y0;
        Line_Y0 = Line_Y1;
        Line_Y1 = y;
    }
_8344:
    Lcd_X = Line_X0;
    Lcd_Y = Line_Y0;
    _00E9753B();
    Temp_Data = Line_X1 - Line_X0;
    if (Line_X1 < Line_X0)
    {
    _83DC:
        return;
    }
_8365:
    Temp_Data2 = Line_Y1 - Line_Y0;
    if ((Temp_Data2 & 0x80) == 0x00)
    {
        if (Temp_Data >= Temp_Data2)
        {
        _8379:
            Line_K = 0x01;
        }
        else
        {
        _8381:
            Line_X1 = Line_X0 + Temp_Data2;
            Line_Y1 = Line_Y0 + Temp_Data;
            Line_K = 0x02;
        }
    }
    else // 结果为负
    {
    _839D:
        Temp_Data2 = 0x100 - Temp_Data2;
        if (Temp_Data >= Temp_Data2)
        {
        _83AE:
            Line_Y1 = Line_Y0 + Temp_Data2;
            Line_K = 0x04;
        }
        else
        {
        _83C0:
            Line_X1 = Line_X0 + Temp_Data2;
            Line_Y1 = Line_Y0 + Temp_Data;
            Line_K = 0x03;
        }
    }
_83DD:
    *(UINT16*)(MCU_memory + 0x20E1) = (UINT16)Line_Y0 - Line_Y1;
    *(UINT16*)(MCU_memory + 0x20DF) = (UINT16)Line_X1 - Line_X0;
    *(UINT16*)(MCU_memory + 0x20D6) = *(UINT16*)(MCU_memory + 0x20E1) + *(UINT16*)(MCU_memory + 0x20E1);
    *(UINT16*)(MCU_memory + 0x20D6) += *(UINT16*)(MCU_memory + 0x20DF);
    *(UINT16*)(MCU_memory + 0x20D8) = *(UINT16*)(MCU_memory + 0x20E1) + *(UINT16*)(MCU_memory + 0x20E1);
    *(UINT16*)(MCU_memory + 0x20DA) = *(UINT16*)(MCU_memory + 0x20DF) + *(UINT16*)(MCU_memory + 0x20DF);
    *(UINT16*)(MCU_memory + 0x20DA) += *(UINT16*)(MCU_memory + 0x20D8);
    Line_X = Line_X0;
    Line_Y = Line_Y0;
    while (Line_X < Line_X1)
    {
    _8472:
        if ((MCU_memory[0x20D7] & 0x80) == 0x00)
        {
        _8479:
            Line_X++;
            *(UINT16*)(MCU_memory + 0x20D6) += *(UINT16*)(MCU_memory + 0x20D8);
        }
        else // 结果为负
        {
            _8493:
            Line_X++;
            Line_Y++;
            *(UINT16*)(MCU_memory + 0x20D6) += *(UINT16*)(MCU_memory + 0x20DA);
        }
    _84AC:
        Temp_Data2 = Line_Y - Line_Y0;
        Temp_Data = Line_X - Line_X0;
        if (Line_K == 0x01)
        {
        _84D6:
            Lcd_X = Line_X;
            Lcd_Y = Line_Y;
        }
        else if (Line_K == 0x02)
        {
            _84E5:
            Lcd_X = Line_X0 + Temp_Data2;
            Lcd_Y = Line_Y0 + Temp_Data;
        }
        else if (Line_K == 0x03)
        {
            _84FC:
            Lcd_X = Line_X0 + Temp_Data2;
            Lcd_Y = Line_Y0 - Temp_Data;
        }
        else if (Line_K == 0x04)
        {
            _8513:
            Lcd_Y = Line_Y0 - Temp_Data2;
            Lcd_X = Line_X;
        }
        else
        {
            return;
        }
    _8523:
        _00E9753B();
    }
}

// 00E9753B - 00E97602
void _00E9753B()
{
    UINT8 a = Lcd_WriteData;
    UINT8 x = Lcd_X;
    UINT8 y = Lcd_Y;
    _00E97714();
    x = Lcd_X & 0x07;
    Var_PutPixel1 = 0x80;
    while (x)
    {
        Var_PutPixel1 >>= 1;
        x--;
    }
_855E:
    Var_PutPixel2 = Var_PutPixel1 ^ 0xFF;
    if (Lcd_X >= 0x08)
    {
        _856D:
        if ((Lcd_RamMapAddressMove == 0x01) && (Ram_Point2 == MCU_memory + Lcd_RamMapOldAddress))
        {
            _8584:
            Ram_Point2 = MCU_memory + Lcd_RamMapNewAddress;
            if (Lcd_WriteData)
            {
                _8597:
                *Ram_Point2 = (*Ram_Point2 & Var_PutPixel2) | Var_PutPixel1;
            }
            else
            {
                _85A6:
                *Ram_Point2 &= Var_PutPixel2;
            }
            _85AF:
            Ram_Point2 = MCU_memory + Lcd_RamMapOldAddress;
        }
        else
        {
        _85BE:
            if (Lcd_WriteData)
            {
            _85C5:
                *Ram_Point2 = (*Ram_Point2 & Var_PutPixel2) | Var_PutPixel1;
            }
            else
            {
            _85D4:
                *Ram_Point2 &= Var_PutPixel2;
            }
        }
    }
    else
    {
    _85E0:
        if (Lcd_WriteData)
        {
        _85E7:
            *Ram_Point1 = (*Ram_Point1 & Var_PutPixel2) | Var_PutPixel1;
        }
        else
        {
        _85F6:
            *Ram_Point1 &= Var_PutPixel2;
        }
    }
}

// 00E97714 - 00E97830
// 获得当前坐标对应的Ram_Point1、Ram_Point2
void _00E97714() // todo 接收三个参数：a,x,y？
{
    if (Lcd_Y > 0x41)
    {
        _8720:
        Ram_Point2 = MCU_memory + 0x0C40 + (Lcd_Y - 0x42) * 0x20;
        Ram_Point1 = Ram_Point2 - 0x000D;
        if (Lcd_X < 0x08)
        {
            return;
        }
        Var_Ram_Addr = Lcd_X - 0x08;
        while (Var_Ram_Addr >= 0x08)
        {
            Var_Ram_Addr -= 0x08;
            Ram_Point2 += 0x0001;
        }
    }
    else if (Lcd_Y < 0x41)
    {
        _8788:
        Ram_Point2 = MCU_memory + 0x0C20 - Lcd_Y * 0x20;
        Ram_Point1 = Ram_Point2 - 0x000D;
        if (Lcd_X < 0x08)
        {
            return;
        }
        Var_Ram_Addr = Lcd_X - 0x08;
        while (Var_Ram_Addr >= 0x08)
        {
            Var_Ram_Addr -= 0x08;
            Ram_Point2 += 0x0001;
        }
    }
    else // Lcd_Y == 0x41
    {
        _87EA:
        Ram_Point1 = MCU_memory + 0x0FF3;
        Ram_Point2 = MCU_memory + 0x0400;
        if (Lcd_X < 0x08)
        {
            return;
        }
        Var_Ram_Addr = Lcd_X - 0x08;
        while (Var_Ram_Addr >= 0x08)
        {
            Var_Ram_Addr -= 0x08;
            Ram_Point2 += 0x0001;
        }
    }
}

// 00E97831 - 00E97984
void _00E97831()
{
    if (Cursor_Y == 0x41)
    {
        Ram_Point1 = MCU_memory + 0x0FF3;
        Ram_Point2 = MCU_memory + 0x0400;
        if (Cursor_X < 0x08)
        {
            return;
        }
        Cursor_X -= 0x08;
        for (;;)
        {
            if (MCU_memory[0x20C8] < 0x08)
            {
                return;
            }
            MCU_memory[0x20C8] -= 0x08;
            Ram_Point2 += 1;
        }
    }
    else if (Cursor_Y > 0x41)
    {
        *(UINT16*)(MCU_memory + 0x20C4) = 0x0000;
        UINT8 x = Cursor_Y - 0x42;
        while (x)
        {
            *(UINT16*)(MCU_memory + 0x20C4) += 0x0020;
            x--;
        }
        Ram_Point2 = MCU_memory + *(UINT16*)(MCU_memory + 0x20C4) + 0x0C40 - 0x000D;
        if (Cursor_X < 0x08)
        {
            return;
        }
        Cursor_X -= 0x08;
        for (;;)
        {
            if (MCU_memory[0x20C8] < 0x08)
            {
                return;
            }
            MCU_memory[0x20C8] -= 0x08;
            Ram_Point2 += 1;
        }
    }
    else
    {
        *(UINT16*)(MCU_memory + 0x20C4) = 0x0000;
        UINT8 x = Cursor_Y;
        while (x)
        {
            *(UINT16*)(MCU_memory + 0x20C4) += 0x0020;
            x--;
        }
        Ram_Point2 = MCU_memory + 0x0C20 - *(UINT16*)(MCU_memory + 0x20C4) - 0x000D;
        if (Cursor_X < 0x08)
        {
            return;
        }
        Cursor_X -= 0x08;
        for (;;)
        {
            if (MCU_memory[0x20C8] < 0x08)
            {
                return;
            }
            MCU_memory[0x20C8] -= 0x08;
            Ram_Point2 += 1;
        }
    }
}

// 00E97985 - 00E97A3B
void _00E97985()
{
    if (MCU_memory[0x20CB] < 0x40)
    {
    _89B7:
        Ram_Point2 -= 0x0020;
        Ram_Point1 -= 0x0020;
    }
    else if (MCU_memory[0x20CB] == 0x40)
    {
    _89DA:
        Ram_Point2 -= 0x0020;
        Ram_Point1 = MCU_memory + 0x0FF3;
    }
    else if (MCU_memory[0x20CB] == 0x41)
    {
    _89F6:
        Ram_Point1 = MCU_memory + 0x0C33;
        Ram_Point2 = MCU_memory + 0x0C40;
        if (Cursor_X >= 0x08)
        {
        _8A12:
            MCU_memory[0x20C8] = Cursor_X - 0x08;
            for (;;)
            {
                if (MCU_memory[0x20C8] < 0x08)
                {
                    return;
                }
            _8A24:
                MCU_memory[0x20C8] -= 0x08;
                Ram_Point2 += 0x0001;
            }
        }
    }
    else
    {
    _8994:
        Ram_Point2 += 0x0020;
        Ram_Point1 += 0x0020;
    }
}

// 00E996C6 - 00E996D5
void _00E996C6()
{
    UINT8 x = 0x00;
    do
    {
        x++;
    } while (x < 0xFE);
}

// 00E99749 - 00E99786
void _00E99749(U8 data)
{
    UINT8 _6D15[] = {
        0x5D, 0x5F, 0x4C, 0x52, 0x58, 0x26, 0x27, 0x2D,
        0x31, 0x2C, 0x22, 0x1D, 0x17, 0x10, 0x00, 0x5C,
        0x5E, 0x14, 0x1F, 0x29, 0x0D, 0x06, 0x44, 0x00,
        0x3D };
    UINT8 x = 0x17;
    Lcd_WriteData = data;
    Ram_Point1 = MCU_memory + 0x0412 + _6D15[x] * 0x20;
    UINT8 a = *Ram_Point1 & 0xFE;
    if (Lcd_WriteData)
    {
        a |= 0x01;
    }
    *Ram_Point1 = a;
}

// 00E999DB - 00E99A3F
void _00E999DB()
{
    UINT8 _6CEE[0x27] = { 
        0x00,0x24,0x21,0x1E,0x1B,0x19,0x18,0x16,0x15,0x12,0x0F,0x0E,0x0C,0x0B,0x0A,0x09,
        0x05,0x04,0x03,0x02,0x01,0x42,0x43,0x45,0x46,0x47,0x48,0x49,0x4A,0x4B,0x4D,0x4F,
        0x50,0x51,0x53,0x54,0x55,0x56,0x57 };
    if (Lcd_Y >= 0x27)
    {
        return;
    }
    if (Lcd_X >= 0x27)
    {
        return;
    }
    if (Lcd_X + Lcd_Y >= 0x28)
    {
        return;
    }
    if (Lcd_X == 0x00)
    {
        return;
    }
    if (Lcd_Y == 0x00)
    {
        return;
    }
_69FF:
    do
    {
        Ram_Point1 = MCU_memory + 0x0412 + _6CEE[Lcd_X] * 0x20; // todo
        UINT8 a = *Ram_Point1 & 0xFE;
        if (Lcd_WriteData)
        {
        _6A2E:
            a |= 0x01;
        }
    _6A30:
        *Ram_Point1 = a;
        Lcd_X++;
        Lcd_Y--;
    } while (Lcd_Y);
}

// 00E99C85 - 00E99CA6
// (MCU_memory[0x2085]<<8)+MCU_memory[0x2089]<=MCU_memory[0x2087]*MCU_memory[0x2085]
// Mult_8U
void _00E99C85() // 字节码同_00E96BD2
{
    MCU_memory[0x2089] = 0x00;
    for (UINT8 y = 0x08; y > 0; y--)
    {
        UINT8 tmp = MCU_memory[0x2085];
        MCU_memory[0x2085] = (MCU_memory[0x2085] << 1) + (MCU_memory[0x2089] >> 7);
        MCU_memory[0x2089] <<= 1;
        if (tmp & 0x80)
        {
            _6C94:
            UINT16 tmp16 = (UINT16)MCU_memory[0x2087] + (UINT16)MCU_memory[0x2089];
            MCU_memory[0x2089] += MCU_memory[0x2087];
            if (tmp16 & 0x100)
            {
                _6CA0:
                MCU_memory[0x2085] += 1;
            }
        }
    }
}

// 00E9DF59 - 00E9DF65
UINT8 _00E9DF59() // 获取选择的数据块
{
    return (_PB & 0xC0) >> 6;
}

// 00E9DF66 - 00E9DFA1
void _00E9DF66(UINT8 a) // 选择数据块
{
    if (a == 0x03)
    {
    _6F76:
        _PB = (_PB & 0x3F) | 0xC0;
    }
    else if (a == 0x02)
    {
    _6F81:
        _PB = (_PB & 0x3F) | 0x80;
    }
    else if (a == 0x01)
    {
    _6F8C:
        _PB = (_PB & 0x3F) | 0x40;
    }
    else if (a == 0x00)
    {
    _6F97:
        _PB = (_PB & 0x3F) | 0x00;
    }
    else
    {
        _PB = (_PB & 0x3F) | 0xC0;
    }
}

// 00E9E0F4 - 00E9E119
void _00E9E0F4() // LCDDriverInit
{
    _LCDCON = 0x1A;
    _00E9E226();
    _00E9EBB0();
    _00E9EBB0();
    _00E9EBB0();
    LCD_brightness = 0x10;
    _LCDRES = 0x76;
    _LCDMODE = 0x80;
    _LCDCON = 0x94;
}

// 00E9E157 - 00E9E1C3
void _00E9E157() // LCDPowerOff
{
    SysLcdPartClear(0x00, 0x00, 0x9E, 0x5F);
    _LCDCON = 0x1A;
    _00E9EBB0();
    _00E9EBB0();
    _00E9EBB0();
    _PA |= 0xC0;
    //void;
    //void;
    _PA &= 0x7F;
    _00E9E1D3(0x50);
    _00E9EBB0();
    _00E9EBB0();
    _00E9EBB0();
    _PA &= 0x7F;
    //void;
    //void;
    _PA |= 0x80;
}

// 00E9E1C4 - 00E9E1D2
void _00E9E1C4() // LCDPowerOn
{
    _00E9E226();
    _00E9EBB0();
    _00E9EBB0();
    _LCDCON = 0x94;
}

// 00E9E1D3 - 00E9E225
void _00E9E1D3(UINT8 v)
{
    for (UINT8 y = 0x08; y != 0x00; y--)
    {
        _PA |= 0x40;

        _PA &= 0xBF;
        _PA = (_PA & 0x7F) | (v & 0x80);
        _PA &= 0xBF;

        _PA |= 0x40;

        v <<= 1;
    }
}

// 00E9E226 - 00E9E2B5
void _00E9E226() // ClearLCDRam_0
{
    _PA |= 0xC0;
    _PA |= 0xC0;

    _PA &= 0x7F;
    _00E9E1D3(0x11);
    _PA &= 0x7F;

    _PA |= 0x80;
    _00E9EBB0();
    _00E9EBB0();
    _00E9EBB0();
    _PA |= 0xC0;

    _PA &= 0x7F;
    _00E9E1D3(0x50);
    _00E9E1D3(0x01);
    _00E9E1D3(0x26);
    _00E9E1D3(0x37);
    _00E9E1D3(0x84);
    _00E9E1D3(0x97);
    _00E9E1D3(0xE0);
    _00E9E1D3(0x57);
    _00E9EBB0();
    _00E9EBB0();
    _00E9EBB0();
    _PA &= 0x7F;

    _PA |= 0x80;
}

// 00E9E2B6 - 00E9E2F1
void _00E9E2B6() // ClearLCDRam_1
{
    for (UINT16 i = 0; i < 0x0C00; i++)
    {
        pLcdMemory[i] = 0x00;
    }
    MCU_memory[Lcd_RamMapNewAddress] = 0x00;
}

// 00E9E64C - 00E9E64C
void _00E9E64C() // BRK_ISR_routine
{
    //void
}

// 00E9E6F4 - 00E9E70E
UINT8 _00E9E6F4()
{
    if (KeyBuffBottom == KeyBuffTop)
    {
        return 0xFF;
    }
    return KeyBuffer[KeyBuffBottom];
}

// 00E9E869 - 00E9E86E
UINT8 SysGetAlmMinute()
{
    return _ALMMIN & 0x3F;
}

// 00E9E86F - 00E9E874
UINT8 SysGetAlmHour()
{
    return _ALMHR & 0x1F;
}

// 00E9E875 - 00E9E88F
void SysGetAlmDay(UINT16* day)
{
    *day = _ALMDAYL + ((_ALMDAYH & 0x01) << 8);
}

// 00E9E890 - 00E9E893
void SysSetAlmMinute(UINT8 minute)
{
    _ALMMIN = minute;
}

// 00E9E894 - 00E9E897
void SysSetAlmHour(UINT8 hour)
{
    _ALMHR = hour;
}

// 00E9E898 - 00E9E8A5
void SysSetAlmDay(UINT16 day)
{
    _ALMDAYL = day;
    _ALMDAYH = day >> 8;
}

// 00E9EBB0 - 00E9EBCF
void _00E9EBB0() // CpuFreqDelay
{
    for (UINT8 x = 0x10; x > 0; x--)
    {
        for (UINT8 y = 0xFF; y > 0; y--)
        {
            // NOP
        }
    }
}

// 00E9EBD0 - 00E9EBE0
void _00E9EBD0()
{
    UINT8 x = 0x02;
    do
    {
        x--;
    } while (x >= 0x01);

}

// 00E9EBE1 - 00E9EC25
void ChangCpuFreqTo16M()
{
    _CPUCLK = 0x03;
    _SYSCON = 0x40;
    _OSCK = 0xF3;
    _CPUCLK = 0x83;
    _PH1PH2 = 0x80;
    _EXT_AC2 = 0x99;
    _SYSCON = 0x05;
    UINT8 x = 0xFF;
    do
    {
        x--;
    } while (x >= 0x01);
    _CPUCLK = 0x80;
}

// 00E9EC26 - 00E9EC68
void ChangCpuFreqTo8M()
{
    _CPUCLK = 0x03;
    _SYSCON = 0x40;
    _PH1PH2 = 0x00;
    _OSCK = 0xF3;
    _CPUCLK = 0x03;
    _SYSCON = 0x05;
    UINT8 x = 0xFF;
    do
    {
        _00E9EBD0();
        x--;
    } while (x >= 0x01);
    _CPUCLK = 0x00;
}

// 00E9EC69 - 00E9ECAB
void ChangCpuFreqTo4M()
{
    _CPUCLK = 0x03;
    _SYSCON = 0x40;
    _PH1PH2 = 0x00;
    _OSCK = 0x6C;
    _CPUCLK = 0x03;
    _SYSCON = 0x04;
    UINT8 x = 0xFF;
    do
    {
        _00E9EBD0();
        x--;
    } while (x >= 0x01);
    _CPUCLK = 0x00;
}

// 00E9ECB1 - 00E9ECE4
void _00E9ECB1()
{
    MCU_memory[0x2050] = 0x00;
    MCU_memory[0x2051] = 0x00;
    MCU_memory[0x2052] = 0x00;
    MCU_memory[0x2053] = 0x00;
    MCU_memory[0x2054] = 0x00;
    MCU_memory[0x2055] = 0x00;
    MCU_memory[0x2056] = 0x00;
    MCU_memory[0x2057] = 0x00;
    MCU_memory[0x2058] = 0x00;

    MCU_memory[0x205A] = 0x00;
    MCU_memory[0x205B] = 0x00;
    MCU_memory[0x205C] = 0x00;
    MCU_memory[0x205D] = 0x00;
    _00E9ECE5();
    _00E9EEDD(0x03);
}

// 00E9ECE5 - 00E9ED56
void _00E9ECE5()
{
    if (MCU_memory[0x2059])
    {
        _PADR = 0xDF;
        _PAR = 0x20;
        _PA = 0xFF;
        _PBDR = 0xEB;
        _PBR = 0x14;
        _PB |= 0x3F;
        _PB &= 0xDF;
        _PB &= 0xF7;
        _PB |= 0x01;
        UINT8 y = 0x00;
        for (;;)
        {
            UINT8 x = 0x00;
            for (;;)
            {
                x++;
                if (x >= 0xFE)
                {
                    break;
                }
            }
            y++;
            if (y >= 0x3F)
            {
                break;
            }
        }
        _PB |= 0x1F;
        _PB |= 0x02;
        _00E9EE3B(0x0B);
        _00E9EE3B(0x01);
        _00E9EFE3(MCU_memory[0x2059]);
    }
}

// 00E9ED57 - 00E9EE3A
UINT8 _00E9ED57()
{
    if (MCU_memory[0x2059] == 0x00)
    {
        return 0x00;
    }
    MCU_memory[0x2021] &= 0xFE;
    _00E9F2E9();
    _00E9F318();
    _00E9EE3B(0x04);
    _00E9EE3B(0x01);
    for (;;)
    {
        UINT8 y = 0xFF;
        MCU_memory[0x205A] = y;
        MCU_memory[0x205B] = 0x03;
        do {
            y--;
            if (y == 0x00)
            {
                y = MCU_memory[0x205A];
                y--;
                MCU_memory[0x205A] = y;
                if (y == 0x00)
                {
                    y = MCU_memory[0x205B];
                    y--;
                    MCU_memory[0x205B] = y;
                    if (y == 0x00)
                    {
                        _00E9ECE5();
                        _00E9EEDD(0x03);
                        _00E9F328();
                        // todo 怀疑这里有bug，没有做好返回值，这里返回0x00避免报错
                        return 0x00;
                    }
                    MCU_memory[0x205A] = 0xFF;
                }
                y = 0xFF;
            }
            if ((_PB & 0x04) == 0x00)
            {
                _00E9F009();
                _00E9EEDD(0x03);
                _00E9F328();
                if (MCU_memory[0x2050] & 0x01)
                {
                    _00E9ECE5();
                    _00E9EEDD(0x03);
                    return 0x01;
                }
                else
                {
                    return 0x00;
                }
            }
        } while (_PB & 0x10);
        if ((MCU_memory[0x2021] & 0x01) != 0x01)
        {
            if ((DictSysFlag_U8 & 0x06) == 0x00) // SYS_FLAG_SCHED_MASK|SYS_FLAG_ALARM_MASK
            {
                if (MCU_memory[0x2052] || MCU_memory[0x2051])
                {
                    UINT8 a = _DATA2;
                    UINT8 x = a;
                    a >>= 4;
                    _00E9EE3B(a | 0x10);
                    a = x;
                    _00E9EE3B((a & 0x0F) | 0x10);
                    _00E9EF98();
                    *(UINT16*)(MCU_memory + 0x2051) += 1;
                    continue;
                }
            }
        }
        _00E9EE3B(0xFF);
        _00E9EE3B(0xFF);
        MCU_memory[0x2050]++;
    }
}

// 00E9EE3B - 00E9EEAC
void _00E9EE3B(UINT8 a)
{
    _PA = a | 0xE0;
    UINT8 y = 0xFF;
    MCU_memory[0x205A] = y;
    MCU_memory[0x205B] = 0x03;
    for (;;)
    {
        y--;
        if (y == 0x00)
        {
            y = MCU_memory[0x205A];
            y--;
            MCU_memory[0x205A] = y;
            if (y == 0x00)
            {
                y = MCU_memory[0x205B];
                y--;
                MCU_memory[0x205B] = y;
                if (y == 0x00)
                {
                    return;
                }
                MCU_memory[0x205A] = 0xFF;
            }
            y = 0xFF;
        }
        if ((_PB & 0x10) == 0x00)
        {
            _PB &= 0xFD;
            _PB &= 0xFE;
            //void;
            //void;
            //void;
            //void;
            //void;
            //void;
            //void;
            //void;
            //void;
            //void;
            //void;
            //void;
            //void;
            //void;
            //void;
            //void;
            _PB |= 0x01;
            _PB |= 0x02;
            return;
        }
        else if ((_PB & 0x04) == 0x00)
        {
            return;
        }
    }
}

// 00E9EEAD - 00E9EEDC
UINT8 _00E9EEAD()
{
    _PADR = 0xC0;
    _PAR = 0x3F;
    _PB |= 0x02;
    _PB &= 0xFE;
    UINT8 y = _PA;
    _PB |= 0x01;
    _PADR = 0xDF;
    _PAR = 0x20;
    return y;
}

// 00E9EEDD - 00E9EEF7
void _00E9EEDD(UINT8)
{
    _00E9EE3B(0x08);
    _00E9EE3B(0x03);
    _PA |= 0xFF;
    _PB |= 0x3F;
}

// 00E9EEF8 - 00E9EEFF
void _00E9EEF8()
{
    _00E9EE3B(0x00);
}

// 00E9EF00 - 00E9EF0A
void _00E9EF00()
{
    _00E9EE3B(0x04);
    _00E9EE3B(0x07);
}

// 00E9EF0B - 00E9EF63
void _00E9EF0B(UINT8 a)
{
    if (a == 0x01)
    {
        MCU_memory[0x2054] = 0x01;
        MCU_memory[0x2053] = 0x02;
    }
    else if (a == 0x02)
    {
        MCU_memory[0x2054] = 0x01;
        MCU_memory[0x2053] = 0x04;
    }
    else if (a == 0x03)
    {
        MCU_memory[0x2054] = 0x00;
        MCU_memory[0x2053] = 0x00;
    }
    else if (a == 0x04)
    {
        MCU_memory[0x2054] = 0x00;
        MCU_memory[0x2053] = 0x04;
    }
    else if (a == 0x05)
    {
        MCU_memory[0x2054] = 0x00;
        MCU_memory[0x2053] = 0x03;
    }
    else if (a == 0x06)
    {
        MCU_memory[0x2054] = 0x00;
        MCU_memory[0x2053] = 0x02;
    }
}

// 00E9EF64 - 00E9EF97
UINT8 _00E9EF64()
{
    if (MCU_memory[0x2054] == 0x01)
    {
        if (MCU_memory[0x2053] == 0x02)
        {
            return 0x01;
        }
        else
        {
            return 0x02;
        }
    }
    else
    {
        if (MCU_memory[0x2053] == 0x00)
        {
            return 0x03;
        }
        else if (MCU_memory[0x2053] == 0x04)
        {
            return 0x04;
        }
        else if (MCU_memory[0x2053] == 0x03)
        {
            return 0x05;
        }
        else if (MCU_memory[0x2053] == 0x02)
        {
            return 0x06;
        }
        else
        {
            return MCU_memory[0x2053];
        }
    }
}

// 00E9EF98 - 00E9EFBF
void _00E9EF98()
{
    _00E9EE3B(0x0A);
    _00E9EE3B(MCU_memory[0x2054]);
    _00E9EE3B(0x00);
    _00E9EE3B(0x00);
    _00E9EE3B(MCU_memory[0x2053] >> 4);
    _00E9EE3B(MCU_memory[0x2053] & 0x0F);
}

// 00E9EFC0 - 00E9EFDE
void _00E9EFC0()
{
    _00E9EE3B(0x0A);
    _00E9EE3B(0x02);
    _00E9EE3B(0x0F);
    _00E9EE3B(0x0F);
    _00E9EE3B(0x0F);
    _00E9EE3B(0x08);
}

// 00E9EFDF - 00E9EFE2
void _00E9EFDF(UINT8 a)
{
    MCU_memory[0x2059] = a;
}

// 00E9EFE3 - 00E9EFF3
void _00E9EFE3(UINT8 a)
{
    if (a >= 0x07)
    {
        a = 0x06;
    }
    _00E9EE3B(0x06);
    _00E9EE3B(a);
}

// 00E9EFF4 - 00E9F008
void _00E9EFF4()
{
    _00E9EE3B(0x05);
    _00E9EE3B(0x01);
    while (_PB & 0x04)
    {
        // void
    }
    _00E9F009();
}

// 00E9F009 - 00E9F03D
void _00E9F009()
{
    MCU_memory[0x2055] = _00E9EEAD();
    while (_PB & 0x04)
    {
        //void
    }
    MCU_memory[0x2056] = _00E9EEAD();
    while (_PB & 0x04)
    {
        //void
    }
    MCU_memory[0x2057] = _00E9EEAD();
    while (_PB & 0x04)
    {
        //void
    }
    MCU_memory[0x2058] = _00E9EEAD();
    while (_PB & 0x10)
    {
        //void
    }
}

// 00E9F03E - 00E9F09F
UINT8 _00E9F03E()
{
    UINT8 y = 0xFF;
    MCU_memory[0x205A] = y;
    MCU_memory[0x205B] = 0x05;
    while (_PB & 0x04)
    {
        _8052:
        y--;
        if (y == 0x00)
        {
            y = MCU_memory[0x205A];
            y--;
            MCU_memory[0x205A] = y;
            if (y == 0x00)
            {
            _8062:
                y = MCU_memory[0x205B];
                y--;
                MCU_memory[0x205B] = y;
                if (y == 0x00)
                {
                _806D:
                    return 0x01;
                }
                else
                {
                _8070:
                    MCU_memory[0x205A] = 0xFF;
                }
            }
        _8075:
            y = 0xFF;
        }
    _8077:
        if (_PB & 0x04)
        {
        _8081:
            if (DictSysFlag & 0x01000000 || DictSysFlag & 0x00000006)
            {
            _809D:
                return 0x01;
            }
            else
            {
            _8093:
                if (_PB & 0x04)
                {
                    continue;
                }
                else
                {
                    _809A:
                    return 0x00;
                }
            }
        }
        _807E:
        return 0x00;
    }
    _804F:
    return 0x00;
}

// 00E9F0A0 - 00E9F0ED
UINT8 _00E9F0A0()
{
    UINT8 y = 0xFF;
    MCU_memory[0x205A] = y;
    MCU_memory[0x205B] = 0x03;
    _80AA:
    y--;
    if (y == 0x00)
    {
    _80AF:
        y = MCU_memory[0x205A];
        y--;
        MCU_memory[0x205A] = y;
        if (y == 0x00)
        {
        _80BA:
            y = MCU_memory[0x205B];
            y--;
            MCU_memory[0x205B] = y;
            if (y == 0x00)
            {
            _80C5:
                return 0x01;
            }
            else
            {
            _80C8:
                MCU_memory[0x205A] = 0xFF;
            }
        }
    _80CD:
        y = 0xFF;
    }
_80CF:
    if (DictSysFlag & 0x01000000 || DictSysFlag & 0x00000006)
    {
    _80EB:
        return 0x01;
    }
    else
    {
    _80E1:
        if (_PB & 0x10)
        {
            goto _80AA;
        }
        else
        {
        _80E8:
            return 0x00;
        }
    }
}

// 00E9F0EE - 00E9F1BE
void _00E9F0EE()
{
    SysClearKeyBuffer();
    _00E9EE3B(0x04);
    _00E9EE3B(0x04);
    if (_00E9F03E() == 0x00)
    {
    _8105:
        _00E9F009();
        MCU_memory[0x2051] = MCU_memory[0x2055] << 4;
        MCU_memory[0x2051] += MCU_memory[0x2056] & 0x0F;
        while (_00E9F0A0() == 0x00)
        {
        _8128:
            if (MCU_memory[0x2051] == 0x00)
            {
                _812D:
                while (_PB & 0x04)
                {
                    // void
                }
                _00E9F009();
                if (MCU_memory[0x2055] & 0x0F)
                {
                    break;
                }
            _8143:
                if ((MCU_memory[0x2057] & 0x0F) != 0x02)
                {
                    break;
                }
            _814F:
                if ((MCU_memory[0x2058] & 0x0F) != 0x03)
                {
                    break;
                }
            _815B:
                MCU_memory[0x2051] = MCU_memory[0x2056] & 0x0F;
                _00E9EE3B(0x09);
                _00E9EE3B(MCU_memory[0x2051]);
            }
        _816E:
            UINT8 a = *buff_point;
            UINT8 x = a;
            a >>= 4;
            _00E9EE3B(a | 0x10);
            a = x;
            _00E9EE3B((a & 0x0F) | 0x10);
            MCU_memory[0x2051]--;
            buff_point++;
            if (DictSysFlag & 0x01000000)
            {
                break;
            }
            if (DictSysFlag & 0x00000006)
            {
                break;
            }
        }
    }
_81B3:
    _00E9ECE5();
    _00E9EEDD(0x03);
    _00E9F328();
}

// 00E9F1BF - 00E9F2E8
UINT8 _00E9F1BF(UINT8 a, UINT8 _17D0, UINT8 _17D1, UINT8* _17D2)
{
    UINT8 y;
    MCU_memory[0x205D] = a;
    MCU_memory[0x2051] = _17D0;
    MCU_memory[0x2050] = _17D0;
    MCU_memory[0x2052] = _17D1;
    buff_point = _17D2;
    if (MCU_memory[0x2059] == 0x00)
    {
        return 0x00;
    }
_81E6:
    if ((DictSysFlag & 0x04000000) == 0x00000000)
    {
        return 0x00;
    }
_81F0:
    _00E9ECE5();
    _00E9F2E9();
    _00E9F318();
    DictSysFlag &= 0xFEFFFFFF;
    if (MCU_memory[0x205D])
    {
    _8208:
        _00E9F0EE();
        return 0x00;
    }
_820C:
    _00E9EE3B(0x04);
    _00E9EE3B(0x01);
_8216:
    y = 0xFF;
    MCU_memory[0x205A] = y;
    MCU_memory[0x205B] = 0x03;
    _8220:
    y--;
    if (y == 0x00)
    {
    _8225:
        y = MCU_memory[0x205A];
        y--;
        MCU_memory[0x205A] = y;
        if (y == 0x00)
        {
        _8230:
            y = MCU_memory[0x205B];
            y--;
            MCU_memory[0x205B] = y;
            if (y)
            {
            _8247:
                MCU_memory[0x205A] = 0xFF;
            }
            else
            {
            _823B:
                _00E9ECE5();
                _00E9EEDD(0x03);
                _00E9F328();
                return 0x00;
            }
        }
    _824C:
        y = 0xFF;
    }
_824E:
    if (_PB & 0x04)
    {
    _8275:
        if (_PB & 0x10)
        {
            goto _8220;
        }
        if (DictSysFlag & 0x01000000 || DictSysFlag & 0x00000006
            || (MCU_memory[0x2052] == 0x00 && MCU_memory[0x2051] == 0x00))
        {
        _8298:
            _00E9EE3B(0xFF);
            _00E9EE3B(0xFF);
            MCU_memory[0x2050]++;
            goto _8216;
        }
        else
        {
        _82AE:
            UINT8 a = *buff_point;
            UINT8 x = a;
            a >>= 4;
            _00E9EE3B(a | 0x10);
            a = x;
            _00E9EE3B((a & 0x0F) | 0x10);
            *(UINT16*)(MCU_memory + 0x2051) -= 0x0001;
            buff_point++;
            goto _8216;
        }
    }
    else
    {
    _8255:
        _00E9F009();
        _00E9EEDD(0x03);
        _00E9F328();
        if (MCU_memory[0x2050] & 0x01)
        {
        _8267:
            _00E9ECE5();
            _00E9EEDD(0x03);
            return 0x01;
        }
        else
        {
        _8272:
            return 0x00;
        }
    }
}

// 00E9F2E9 - 00E9F317
void _00E9F2E9()
{
    SysIconAllSave((PtrSysIconEnv)MCU_memory + 0x2062);
}

// 00E9F318 - 00E9F327
void _00E9F318()
{
    SysIconSpeaker(0x01);
}

// 00E9F328 - 00E9F356
void _00E9F328()
{
    SysIconAllRestore((PtrSysIconEnv)MCU_memory + 0x2062);
}

// 00E9F357 - 00E9F385
void _00E9F357()
{
    UINT8 _6C20[] = {0x22, 0x6C};
    _00E9ECE5();
    MCU_memory[0x2051] = 0x27;
    MCU_memory[0x2052] = 0x00;
    UINT8 y = 0x00;
    _ADDR2L = _6C20[0] + 0x00;
    _ADDR2M = _6C20[1] + 0x70;
    _ADDR2H = 0xE9 + 0x00;
    _00E9ED57();
}

// 00E9F386 - 00E9F3A5
void _00E9F386()
{
    MCU_memory[0x2021] &= 0xFE;
    UINT8 x = 0xFF;
    do
    {
        UINT8 y = 0xFF;
        do
        {
            if (MCU_memory[0x2021] & 0x01)
            {
                return;
            }
            y--;
        } while (y);
        x--;
    } while (x);
}

// 00E9F3A6 - 00E9F466
void _00E9F3A6(UINT16 _17D0)
{
    if (MCU_memory[0x2059] == 0x00)
    {
        _00E9F386();
    }
_83B0:
    MCU_memory[0x205D] = _00E9DF59();
    _00E9DF66(0x01);
    *(UINT16*)(MCU_memory + 0x205A) = _17D0;
    *(UINT16*)(MCU_memory + 0x205A) *= 3;
    UINT32 tmp = *(UINT16*)(MCU_memory + 0x205A) + 0x79290D;
    _ADDR2L = tmp;
    _ADDR2M = tmp >> 8;
    _ADDR2H = tmp >> 16;
    MCU_memory[0x205A] = _DATA2;
    MCU_memory[0x205B] = _DATA2;
    UINT8 x = _DATA2;
    MCU_memory[0x2051] = _DATA2 - MCU_memory[0x205A];
    MCU_memory[0x2050] = MCU_memory[0x2051];
    MCU_memory[0x2052] = _DATA2 - MCU_memory[0x205B];
    tmp = *(UINT16*)(MCU_memory + 0x205A) + 0x792F4F + (x<<16);
    _ADDR2L = tmp;
    _ADDR2M = tmp >> 8;
    _ADDR2H = tmp >> 16;
    _00E9ECE5();
    _00E9ED57();
    _00E9DF66(MCU_memory[0x205D]);
}

// 00E9F467 - 00E9F50F
void _00E9F467(UINT8 _16E6, UINT32 _16E7, UINT8* _16EB)
{
    MCU_memory[0x205C] = _16E6;
    _ADDR2L = _16E7;
    _ADDR2M = _16E7 >> 8;
    _ADDR2H = _16E7 >> 16;
    buff_point = _16EB;
    *(UINT16*)(MCU_memory + 0x205A) = (UINT16)MCU_memory[0x205A] << 1;
    UINT32 tmp = *(UINT16*)(MCU_memory + 0x205A) + (_ADDR2L + (_ADDR2M << 8) + (_ADDR2H << 16));
    _ADDR2L = tmp;
    _ADDR2M = tmp >> 8;
    _ADDR2H = tmp >> 16;
    MCU_memory[0x205A] = _DATA2;
    MCU_memory[0x205B] = _DATA2;
    MCU_memory[0x205D] = _DATA2 - MCU_memory[0x205A];
    tmp = 16E7 + *(UINT16*)(MCU_memory + 0x205A);
    _ADDR2L = tmp;
    _ADDR2M = tmp >> 8;
    _ADDR2H = tmp >> 16;
    *(UINT16*)(MCU_memory + 0x205A) = (UINT16)MCU_memory[0x205C] << 1;
    tmp = *(UINT16*)(MCU_memory + 0x205A) + (_ADDR2L + (_ADDR2M << 8) + (_ADDR2H << 16));
    _ADDR2L = tmp;
    _ADDR2M = tmp >> 8;
    _ADDR2H = tmp >> 16;
}

// 00E9F510 - 00E9F5F0
void _00E9F510(UINT8 a, UINT8 _16E8, UINT32 _16E9)
{
    MCU_memory[0x205A] = a;
    MCU_memory[0x205C] = _16E8;
    _ADDR2L = _16E9;
    _ADDR2M = _16E9 >> 8;
    _ADDR2H = _16E9 >> 16;
    UINT8 x = MCU_memory[0x205A];
    *(UINT16*)(MCU_memory + 0x205A) = (UINT16)MCU_memory[0x205A] << 1;
    a = x;
    *(UINT16*)(MCU_memory + 0x205A) += a;
    UINT32 tmp32 = *(UINT16*)(MCU_memory + 0x205A) + ((_ADDR2H << 16) + (_ADDR2M << 8) + _ADDR2L);
    _ADDR2L = tmp32;
    _ADDR2M = tmp32 >> 8;
    _ADDR2H = tmp32 >> 16;
    MCU_memory[0x205A] = _DATA2;
    MCU_memory[0x205B] = _DATA2;
    x = _DATA2;
    MCU_memory[0x2051] = _DATA2 - MCU_memory[0x205A];
    MCU_memory[0x2050] = MCU_memory[0x2051];
    MCU_memory[0x2052] = _DATA2 - MCU_memory[0x205B];
    tmp32 = _16E9 + ((x << 16) + (MCU_memory[0x205B] << 8) + MCU_memory[0x205A]);
    _ADDR2L = tmp32;
    _ADDR2M = tmp32 >> 8;
    _ADDR2H = tmp32 >> 16;
    *(UINT16*)(MCU_memory + 0x205A) = (UINT16)MCU_memory[0x205C] << 1;
    *(UINT16*)(MCU_memory + 0x205A) += MCU_memory[0x205C];
    tmp32 = *(UINT16*)(MCU_memory + 0x205A) + ((_ADDR2H << 16) + (_ADDR2M << 8) + _ADDR2L);
    _ADDR2L = tmp32;
    _ADDR2M = tmp32 >> 8;
    _ADDR2H = tmp32 >> 16;
    if (MCU_memory[0x2059] == 0x00)
    {
        _00E9F386();
    }
    _00E9ECE5();
    _00E9ED57();
}

// 00E9F5F1 - 00E9F60E
void _00E9F5F1(UINT8 a, UINT8 _16E6, UINT32 _16E7, UINT8* _16EB)
{
    MCU_memory[0x205A] = a;
    _00E9F467(_16E6, _16E7, _16EB);
    UINT8 x = MCU_memory[0x205D];
    UINT8 y = 0x00;
    while (x)
    {
    _8600:
        x--;
        buff_point[y] = _DATA2;
        y++;
    }
_860A:
    buff_point[y] = 0x00;
}

// 00E9F60F - 00E9F651
UINT8 _00E9F60F(UINT8 a, UINT8 _16E6, UINT32 _16E7, UINT8* _16EB)
{
    MCU_memory[0x205A] = a;
    _00E9F467(_16E6, _16E7, _16EB);
    UINT8 x = MCU_memory[0x205D];
    UINT8 y = 0x00;
    MCU_memory[0x205A] = 0x00;
    while (x)
    {
    _8623:
        x--;
        UINT8 a = _DATA2;
        if (a == 0x40) // '@'
        {
        _8631:
            buff_point[y] = 0x00;
            MCU_memory[0x205A]++;
            buff_point += 0x0015;
            y = 0x00;
        }
        else
        {
        _862B:
            buff_point[y] = a;
            y++;
        }
    }
_864E:
    return MCU_memory[0x205A];
}

// 00E9F652 - 00E9F73B
UINT8 _00E9F652(UINT16 _17D0, UINT8* _17D2, UINT8* _17D4)
{
    MCU_memory[0x205D] = _00E9DF59();
    _00E9DF66(0x01);
    *(UINT16*)(MCU_memory + 0x205A) = _17D0;
    buff_point = _17D2;
    buff_point1 = _17D4;
    *(UINT16*)(MCU_memory + 0x205A) <<= 1;
    UINT32 tmp = *(UINT16*)(MCU_memory + 0x205A) + 0x78C856;
    _ADDR2L = tmp;
    _ADDR2M = tmp >> 8;
    _ADDR2H = tmp >> 16;
    MCU_memory[0x205A] = _DATA2;
    MCU_memory[0x205B] = _DATA2;
    UINT8 x = _DATA2 - MCU_memory[0x205A];
    tmp = *(UINT16*)(MCU_memory + 0x205A) + 0x78CC82;
    _ADDR2L = tmp;
    _ADDR2M = tmp >> 8;
    _ADDR2H = tmp >> 16;
    UINT8 y = 0x00;
    MCU_memory[0x205A] = 0x00;
    while (x)
    {
    _86F3:
        x--;
        UINT8 a = _DATA2;
        if (a != 0x40)
        {
        _86FB:
            buff_point1[y] = a;
            y++;
        }
        else
        {
        _8701:
            buff_point1[y] = 0x00;
            MCU_memory[0x205A]++;
            buff_point1 += 0x0015;
            MCU_memory[0x205B] = y;
            y = 0x00;
        }
    }
_8721:
    *buff_point = MCU_memory[0x205B];
    _00E9DF66(MCU_memory[0x205D]);
    return MCU_memory[0x205A];
}

// 00E9F73C - 00E9F7FC
UINT8 _00E9F73C(UINT16 _17D0, UINT8* _17D2)
{
    MCU_memory[0x205D] = _00E9DF59();
    _00E9DF66(0x01);
    *(UINT16*)(MCU_memory + 0x205A) = _17D0;
    buff_point = _17D2;
    *(UINT16*)(MCU_memory + 0x205A) <<= 1;
    UINT32 tmp = *(UINT16*)(MCU_memory + 0x205A) + 0x788000;
    _ADDR2L = tmp;
    _ADDR2M = tmp >> 8;
    _ADDR2H = tmp >> 16;
    MCU_memory[0x205A] = _DATA2;
    MCU_memory[0x205B] = _DATA2;
    UINT8 x = _DATA2 - MCU_memory[0x205A];
    tmp = *(UINT16*)(MCU_memory + 0x205A) + 0x78842C;
    _ADDR2L = tmp;
    _ADDR2M = tmp >> 8;
    _ADDR2H = tmp >> 16;
    UINT8 y = 0x00;
    MCU_memory[0x205A] = 0x00;
    while (x)
    {
    _87D1:
        x--;
        UINT8 a = _DATA2;
        if (a != 0x40)
        {
        _87D9:
            buff_point[y] = a;
            y++;
        }
        else
        {
        _87DF:
            MCU_memory[0x205A]++;
        }
    }
_87E5:
    buff_point[y] = 0x00;
    _00E9DF66(MCU_memory[0x205D]);
    return MCU_memory[0x205A];
}

// 00E9F7FD - 00E9F885
UINT8 _00E9F7FD(UINT8 a, UINT8 _17D0, UINT8* _17D1)
{
    UINT32 tmp = (a << 1) + 0x780800;
    _ADDR2L = tmp;
    _ADDR2M = tmp >> 8;
    _ADDR2H = tmp >> 16;
    UINT8 x = _DATA2;
    UINT8 y = _DATA2;
    tmp = (y<<8) + x + 0x7808DA;
    _ADDR2L = tmp;
    _ADDR2M = tmp >> 8;
    _ADDR2H = tmp >> 16;
    MCU_memory[0x205A] = 0x00;
    x = _17D0;
    buff_point = _17D1;
    y = 0x00;
_8841:
    while (_DATA2 != 0x7B) // '{'
    {
        // void
    }
    if (x)
    {
    _884C:
        x--;
        goto _8841;
    }
_8850:
    a = _DATA2;
    if (a != 0x40) // '@'
    {
    _8857:
        buff_point[y] = a;
        y++;
        goto _8850;
    }
    else
    {
        _885D:
        buff_point[y] = 0x00;
        buff_point += 0x0015;
        y = 0x00;
        x++;
        a = _DATA2;
        if (a != 0x7D) // '}'
        {
            _887C:
            buff_point[y] = a;
            y++;
            goto _8850;
        }
        else
        {
        _8882:
            return MCU_memory[0x205A];
        }
    }
}

// 00E9F886 - 00E9F89B
void _00E9F886(UINT8 a)
{
    if (a)
    {
        MCU_memory[0x2021] |= 0x04;
    }
    else
    {
        MCU_memory[0x2021] &= 0xFB;
    }
}

// 00E9F89C - 00E9F8AA
UINT8 _00E9F89C()
{
    if (DictSysFlag & 0x04000000)
    {
        _88A8:
        return 0x01;
    }
    return 0x00;
}

// 00E9F8AB - 00E9F94B
void _00E9F8AB(UINT16 _17D0)
{
    if ((DictSysFlag & 0x04000000) == 0x00000000)
    {
        return;
    }
    *(UINT16*)(MCU_memory + 0x205A) = _17D0;
    UINT32 tmp = *(UINT16*)(MCU_memory + 0x205A)* 3;
    MCU_memory[0x205A] = tmp;
    MCU_memory[0x205B] = tmp>>8;
    MCU_memory[0x205C] = tmp>>16;
    tmp += 0x8F0000;
    _ADDR2L = tmp;
    _ADDR2M = tmp >> 8;
    _ADDR2H = tmp >> 16;
    MCU_memory[0x205A] = _DATA2;
    MCU_memory[0x205B] = _DATA2;
    UINT8 x = _DATA2;
    tmp = _DATA2;
    tmp += _DATA2 << 16;
    tmp -= *(UINT16*)(MCU_memory + 0x205A);
    MCU_memory[0x2050] = tmp;
    *(UINT16*)(MCU_memory + 0x2051) = tmp;
    tmp = *(UINT32*)(MCU_memory + 0x205A) + 0x8F0123;
    _ADDR2L = tmp;
    _ADDR2M = tmp >> 8;
    _ADDR2H = tmp >> 16;
    _00E9ECE5();
    _00E9ED57();
}

// 00E9F94C - 00E9F9E2
void _00E9F94C(UINT16 _17D0)
{
    *(UINT16*)(MCU_memory + 0x205A) = _17D0;
    UINT32 tmp = *(UINT16*)(MCU_memory + 0x205A) * 3;
    MCU_memory[0x205A] = tmp;
    MCU_memory[0x205B] = tmp >> 8;
    MCU_memory[0x205C] = tmp >> 16;
    tmp += 0x8F6A95;
    _ADDR2L = tmp;
    _ADDR2M = tmp >> 8;
    _ADDR2H = tmp >> 16;
    MCU_memory[0x205A] = _DATA2;
    MCU_memory[0x205B] = _DATA2;
    UINT8 x = _DATA2;
    tmp = _DATA2;
    tmp += _DATA2 << 16;
    tmp -= *(UINT16*)(MCU_memory + 0x205A);
    MCU_memory[0x2050] = tmp;
    *(UINT16*)(MCU_memory + 0x2051) = tmp;
    tmp = *(UINT32*)(MCU_memory + 0x205A) + 0x9128DE;
    _ADDR2L = tmp;
    _ADDR2M = tmp >> 8;
    _ADDR2H = tmp >> 16;
    _00E9ECE5();
    _00E9ED57();
}

// 00EA07D1 - 00EA0A73
U8 _00EA07D1(PtrMsg pMsg) // GuiPowerOff
{
    U8 _17CB[5];
    if (DictSysFlag & SYS_FLAG_DELAY_POWER_OFF_MASK)
    {
    _5804:
        DictSysFlag &= SYS_FLAG_DELAY_POWER_OFF_NMASK;
        SysCursorReadParam(_17CB);
        CloseCursor();
        SysSaveScreenEx();
        while (0x01)
        {
        _5872:
            AppPowerOffHelper();
            GuiEnterPswCheck();
            if (_00F2A93A(PSW_START))
            {
            _588D:
                break;
            }
        _5890:
            DictSysFlag &= SYS_FLAG_DELAY_POWER_OFF_NMASK;
        }
    _58B9:
        SysRestoreScreenEx();
        SysCursorWriteParam(_17CB);
        return 0x00;
    }
    else
    {
    _58F7:
        DictSysFlag &= SYS_FLAG_ZDGJ_NMASK;
        DictSysFlag &= SYS_FLAG_QZGJ_NMASK;
        if (_00F29927(0x00) == 0x06)
        {
        _5958:
            DictSysFlag |= SYS_FLAG_DELAY_POWER_OFF_MASK;
            pMsg->type = DICT_WM_POWER;
            pMsg->param = PWR_OFF;
            return 0x01;
        }
        else
        {
        _59D2:
            Send_len = 0x04;
            g_AppSwitchInfo.heirAppID = GUI_APP_ID_ON_OFF;
            pMsg->type = DICT_WM_COMMAND;
            pMsg->param = CMD_RETURN_HOME;
            return 0x01;
        }
    }
_5A5C:
    return 0x00;
}

// 00EA0A74 - 00EA0B01
U8 _00EA0A74(PtrMsg pMsg, UINT16 _17D2) // GuiHotAppProc
{
    g_AppSwitchInfo.heirAppAttr = GUI_APP_TYPE_HOT_APP;
    g_AppSwitchInfo.heirAppID = _17D2;
    pMsg->type = DICT_WM_COMMAND;
    pMsg->param = CMD_RETURN_HOME;
    return 0x01;
}

// 00EA0B02 - 00EA0D44
U8 _00EA0B02(PtrMsg pMsg) // GuiKeyDispatch
{
    if (pMsg->type == DICT_WM_KEY)
    {
    _5B29:
        switch (pMsg->param)
        {
        case KEY_ON_OFF: // 5B5F
            DictSysFlag |= SYS_FLAG_QZGJ_MASK;
            return _00EA07D1(pMsg);
            break;
        case KEY_HOME_MENU: // 5BAE
            SysIconSpeaker(0x00);
            return _00EA0A74(pMsg, GUI_APP_ID_HOME);
            break;
        case KEY_EC_SJ: // 5BEF
            return _00EA0A74(pMsg, GUI_APP_ID_EC_DICT_SJ);
            break;
        case KEY_EC_SW: // 5C23
            return _00EA0A74(pMsg, 0x0003); // GUI_APP_ID_EC_DICT_SW|GUI_APP_ID_CE_DICT ?
            break;
        }
    _5C57:
        UINT16 _8C36[] = { 0x0405,0x0705,0x0105,0x0205 };
        UINT16* _17CE = _8C36;
        //UINT32 tmp = _17CE + pMsg->param & 0x3F;
        //UINT32 flag = tmp & 0x00010000;
        _17CE += pMsg->param & 0x3F;
        UINT8 _17CD = (*_17CE) >> 8;
        if (/*进位为“1”分支*/0x00) // todo
        {
        _5CCE:
            if (_17CD <= 0x03)
            {
            _5CDC:
                pMsg->type = DICT_WM_COMMAND;
                pMsg->param = CMD_RETURN_HOME;
                return 0x01;
            }
        }
    }
_5D2D:
    return 0x01;
}

// 00EA0D60 - 00EA0E2B
void GuiInputSendChangeMsg(UINT8 _17CF)
{
    MsgType msg = { DICT_WM_COMMAND };
    UINT8 _17CE = _17CF + 0x01;
    if (_17CE == 0x02)
    {
    _5DA5:
        msg.param = CMD_CHN_INPUT_OPEN;
    }
    else
    {
    _5DD0:
        msg.param = CMD_CHN_INPUT_CLOSE;
    }
_5DF8:
    GuiSendMsg(&msg);
}

// 00EA0E2C - 00EA0E46
void GuiInputEng2Chn()
{
    gSysKbdState = (gSysKbdState & 0xF0) | SYS_CHN_KBD;
    SysChnInputOpen();
    GuiInputSendChangeMsg(0x01);
}

// 00EA0E47 - 00EA0E6E
void GuiInputEng2Sym()
{
    gSysKbdState = (gSysKbdState & 0xF0) | SYS_SYM_KBD;
    SysSymInputOpen();
    SysIconNum(0x01);
    GuiInputSendChangeMsg(0x01);
}
// 00EA0E6F - 00EA0E9B
void GuiInputEng2Num()
{
    gSysKbdState = (gSysKbdState & 0xF0) | SYS_NUM_KBD;
    SysIconNum(0x01);
    gSysKbdState &= SYS_CAPS_NSTATE;
    SysIconCaps(0x00);
}

// 00EA0E9C - 00EA0EC9
void GuiInputChn2Sym()
{
    gSysKbdState = (gSysKbdState & 0xF0) | SYS_SYM_KBD;
    SysChnInputClose();
    SysSymInputOpen();
    SysIconNum(0x01);
}

// 00EA0ECA - 00EA0EE4
void GuiInputChn2Eng()
{
    gSysKbdState = (gSysKbdState & 0xF0) | SYS_ENG_KBD;
    SysChnInputClose();
    GuiInputSendChangeMsg(0x00);
}

// 00EA0EE5 - 00EA0F0C
void GuiInputChn2Num()
{
    gSysKbdState = (gSysKbdState & 0xF0) | SYS_NUM_KBD;
    SysIconNum(0x01);
    SysChnInputClose();
    GuiInputSendChangeMsg(0x00);
}

// 00EA0F0D - 00EA0F34
void GuiInputSym2Eng()
{
    gSysKbdState = (gSysKbdState & 0xF0) | SYS_ENG_KBD;
    SysSymInputClose();
    GuiInputSendChangeMsg(0x00);
    SysIconNum(0x00);
}

// 00EA0F35 - 00EA0F62
void GuiInputSym2Chn()
{
    gSysKbdState = (gSysKbdState & 0xF0) | SYS_CHN_KBD;
    SysSymInputClose();
    SysChnInputOpen();
    SysIconNum(0x00);
}

// 00EA0F63 - 00EA0F8A
void GuiInputSym2Num()
{
    gSysKbdState = (gSysKbdState & 0xF0) | SYS_NUM_KBD;
    SysIconNum(0x01);
    SysSymInputClose();
    GuiInputSendChangeMsg(0x00);
}

// 00EA0F8B - 00EA0FA2
void GuiInputNum2Eng()
{
    gSysKbdState = (gSysKbdState & 0xF0) | SYS_ENG_KBD;
    SysIconNum(0x00);
}

// 00EA0FA3 - 00EA0FCA
void GuiInputNum2Chn()
{
    gSysKbdState = (gSysKbdState & 0xF0) | SYS_CHN_KBD;
    SysIconNum(0x00);
    SysChnInputOpen();
    GuiInputSendChangeMsg(0x01);
}

// 00EA0FCB - 00EA0FF2
void GuiInputNum2Sym()
{
    gSysKbdState = (gSysKbdState & 0xF0) | SYS_SYM_KBD;
    SysIconNum(0x01);
    SysSymInputOpen();
    GuiInputSendChangeMsg(0x01);
}

// 00EA17CC - 00EA18C8
U8 _00EA17CC(PtrMsg pMsg)
{
    UINT8 _17CF = gSysKbdAttr & 0x0F;
    _17CF &= 0xFE;
    switch (gSysKbdState & 0x0F)
    {
    case SYS_NUM_KBD: // 6811
    case SYS_ENG_KBD: // 6811
        if (gSysKbdAttr & INPUT_CHN_ENABLE)
        {
        _681B:
            GuiInputEng2Chn();
            return 0x00;
        }
        else if (gSysKbdAttr & INPUT_SYM_ENABLE)
        {
        _6830:
            GuiInputEng2Sym();
            return 0x00;
        }
    _6838:
        pMsg->type = DICT_WM_CHAR_FUN;
        pMsg->param = CHAR_ZY;
        return 0x01;
        break;
    case SYS_CHN_KBD: // 688C
        if (gSysKbdAttr & INPUT_SYM_ENABLE)
        {
        _6896:
            GuiInputEng2Sym();
            return 0x00;
        }
    _689E:
        GuiInputChn2Eng();
        return 0x00;
        break;
    case SYS_SYM_KBD: // 68A9
        GuiInputSym2Eng();
        return 0x00;
        break;
    }
_68B1:
    return 0x00;
}

// 00EA18C9 - 00EA1959
UINT8 _00EA18C9()
{
    if (gSysKbdState & 0x20)
    {
    _68D3:
        _00EA195A();
    }
    switch (gSysKbdState & 0x0F)
    {
    case 0x02: // _68F8
    case 0x01: // _68F8
        if (gSysKbdAttr & 0x04)
        {
        _6907:
            gSysKbdOldState = gSysKbdState & 0x0F;
            GuiInputEng2Sym();
            return 0x00;
        }
        else
        {
        _6902:
            return 0x00;
        }
        break;
    case 0x04: // _691A
        if (gSysKbdAttr & 0x04)
        {
        _6929:
            gSysKbdOldState = gSysKbdState & 0x0F;
            GuiInputChn2Sym();
            return 0x00;
        }
        else
        {
        _6924:
            return 0x00;
        }
        break;
    case 0x08: // _693C
        if (gSysKbdOldState & 0x04)
        {
        _6946:
            GuiInputSym2Chn();
        }
        else
        {
        _694C:
            GuiInputSym2Eng();
        }
        return 0x00;
    }
_6954:
    return 0x00;
}

// 00EA195A - 00EA1972
void _00EA195A() // GuiShiftStateCov
{
    gSysKbdState ^= SYS_SHIFT_STATE;
    SysIconShift(gSysKbdState & SYS_SHIFT_STATE);
}

// 00EA1973 - 00EA1A78
U8 _00EA1973(PtrMsg pMsg) // GuiKbdFilter
{
    UINT8 _17CF = pMsg->param;
    if (((_17CF >= 0x61) && (_17CF <= 0x7A))
        || ((_17CF > 0x41) && (_17CF <= 0x5A)))
    {
    _69D7:
        if (gSysKbdAttr & 0x02)
        {
        _69E1:
            return 0x01;
        }
        else
        {
        _69E9:
            return 0x00;
        }
    }
    else
    {
    _69F1:
        if ((_17CF >= 0x30) && (_17CF <= 0x39))
        {
        _6A0B:
            if (gSysKbdAttr & 0x01)
            {
            _6A15:
                return 0x01;
            }
            else
            {
            _6A1D:
                return 0x00;
            }
        }
        else
        {
        _6A25:
            if ((_17CF == 0x20) || (_17CF == 0x2E))
            {
            //_6A3D:
                if ((gSysKbdAttr & 0x02) || (gSysKbdAttr & 0x01))
                {
                _6A51:
                    return 0x01;
                }
                else
                {
                _6A59:
                    return 0x00;
                }
            }
            else
            {
            _6A61:
                return 0x00;
            }
        }
    }
}

// 00EA1E7C - 00EA1FAA
UINT8 _00EA1E7C(PtrMsg pMsg)
{
    if (gGuiMsgQueCnt + 0x01 > 0x01)
    { // gGuiMsgQueCnt!=0xFF && gGuiMsgQueCnt!=0x00
    _6E9F:
        pMsg->type = gGuiMsgQue[gGuiMsgQueHead].type;
        pMsg->param = gGuiMsgQue[gGuiMsgQueHead].param;
        gGuiMsgQueCnt--;
        gGuiMsgQueCnt &= 0x07;
        gGuiMsgQueHead++;
        gGuiMsgQueHead &= 0x07;
        return 0x01;
    }
    else
    {
    _6F93:
        return 0x00;
    }
}

// 00EA2A9D - 00EA2BDB
void _00EA2A9D() // GuiCurrentLowWarnBox
{
    UINT8 _17AF[0x1C];
    UINT8 _8C15[0x1C] = "  电池电量低,请更换电池!";
    SysMemcpy(_17AF, _8C15, 0x001C);
    CloseCursor();
    GuiMsgBoxHelper(_17AF, 0x0258, 0x00);
    MsgType _17CD = { DICT_WM_COMMAND, CMD_RETURN_HOME };
    GuiPushMsg(&_17CD);
    g_AppSwitchInfo.heirAppAttr = GUI_APP_TYPE_HOT_APP;
    g_AppSwitchInfo.heirAppID = GUI_APP_ID_ON_OFF;
}

// 00EA2C2A - 00EA2D91
UINT16 _00EA2C2A()
{
    GuiMenuType _A08C; // todo
    GuiMenuEnvType _17C4;
    _17C4.x0 = 0x60;
    _17C4.y0 = 0x10;
    _17C4.x1 = 0x88;
    _17C4.y1 = 0x44;
    _17C4.startDispItem = 0x00;
    UINT8 _17C3 = _00E9EF64();
    if (_17C3 < 0x01 || _17C3 > 0x06)
    {
    _7CED:
        _17C3 = 0x04;
    }
_7CF3:
    _17C3 = GuiSingleSelBox(_17C3 - 0x01, &_A08C, &_17C4);
    if (_17C3 < 0x06)
    {
    _7D60:
        _00E9EF0B(_17C3 + 0x01);
    }
    _7D72:
    return _17C3;
}

// 00EA2FAC - 00EA30BE
UINT8 Mem_MCB_Valid(MCB* _17D0)
{
    if ((_17D0->end_flag == MCB_NORMAL) || (_17D0->end_flag == MCB_END))
    {
    _7FF4:
        UINT8* _17CC = (UINT8*)_17D0 + 0x0004 + _17D0->len;
        if ((_17CC > MCU_memory + Mem_Start + Mem_Len) || ((UINT8*)_17D0 < MCU_memory + Mem_Start))
        {
            _809A:
            Mem_Flag = MEM_MCB_ERROR;
            return 0x00;
        }
        else
        {
        _80A7:
            return 0x01;
        }
    }
    else
    {
    _7FEA:
        Mem_Flag = MEM_MCB_ERROR;
        return 0x00;
    }
}

// 00EA30BF - 00EA3233
MCB* Mem_MCB_Next(MCB* _17D0)
{
    MCB* _17CE = _17D0;
    if (((UINT8*)_17D0 < MCU_memory + Mem_Start) || ((UINT8*)_17D0 > MCU_memory + Mem_Start + Mem_Len))
    {
    _8139:
        return 0x0000;
    }
_8144:
    if (_17CE->end_flag == MCB_END)
    {
        _815C:
        return 0x0000;
    }
_8167:
    if (Mem_MCB_Valid(_17CE) == 0x00)
    {
        _8192:
        return 0x0000;
    }
_819D:
    _17D0 = (MCB*)(_17CE->len + (UINT8*)_17D0 + 0x0004);
    if (Mem_MCB_Valid(_17D0) == 0x00)
    {
        _8208:
        return 0x0000;
    }
_8213:
    return _17D0;
}

// 00EA3234 - 00EA3514
UINT8 _00EA3234(MCB* _17D0, UINT16 _17D2) // Mem_MCB_Break
{
    if (_17D0->len - _17D2 <= 0x0004)
    {
    _8293:
        return 0x01;
    }
_8298:
    UINT8 _17C4 = _17D0->use_flag;
    UINT8 _17C5 = _17D0->end_flag;
    UINT16 _17CA = _17D0->len;
    _17D0->len = _17D2;
    _17D0->end_flag = MCB_NORMAL;
    UINT16 _17C6 = _17CA - _17D2 - 0x0004;
    UINT8* _17CC = (UINT8*)_17D0 + _17D2 + 0x0004;
    _17D0 = (MCB*)_17CC;
    _17D0->end_flag = _17C5;
    _17D0->use_flag = _17C4;
    _17D0->len = _17C6;
    return 0x01;
}

// 00EA36D8 - 00EA38DC
UINT8 Mem_MCB_Merge()
{
    MCB* _17CA = (MCB*)(MCU_memory + Mem_Start);
    MCB* _17C8 = (MCB*)(MCU_memory + Mem_Start);
    while (_17CA->end_flag == MCB_NORMAL)
    {
    _872C:
        MCB* _17CC = Mem_MCB_Next(_17CA);
        if (_17CC == 0x0000)
        {
            return 0x01;
        }
    _878E:
        MCB* _17C8 = _17CC;
        if ((_17CA->use_flag == MCB_BLANK) && (_17C8->use_flag == MCB_BLANK))
        {
        _87D4:
            _17CA->len = _17C8->len + _17CA->len + 0x0004;
            _17CA->end_flag = _17C8->end_flag;
        }
        else
        {
        _88AC:
            _17CA = _17C8;
        }
    }
    _88C5:
    return 0x01;
}

// 00EA5641 - 00EA59E3
UINT8 _00EA5641(UINT8* sel, PtrGuiMenu pMenu, PtrGuiMenuEnv	pMenuEnv)
{
    UINT8 _17CE = (pMenuEnv->x1 - pMenuEnv->x0 + 0x01) / 0x10;
    UINT8 _17CD = (pMenuEnv->y1 - pMenuEnv->y0 + 0x01) / 0x10;
    pMenuEnv->maxDispItem = pMenu->colNum * _17CD;
    if (pMenuEnv->maxDispItem > pMenu->itemNum)
    {
    _6742:
        pMenuEnv->maxDispItem = pMenu->itemNum;
    }
_677D:
    if (*sel >= pMenu->itemNum)
    {
    _67AD:
        *sel = pMenu->itemNum - 0x01;
    }
_67DE:
    if (pMenuEnv->startDispItem % pMenu->colNum)
    {
    _680E:
        pMenuEnv->startDispItem = 0x00;
    }
_6834:
    UINT8 _17CC = pMenuEnv->maxDispItem;
    if (pMenuEnv->startDispItem >= pMenu->itemNum || pMenuEnv->startDispItem > *sel)
    {
    _68AC:
        pMenuEnv->startDispItem = 0x00;
    }
_68D2:
    if (*sel - pMenuEnv->startDispItem >= _17CC)
    {
    _6907:
        pMenuEnv->startDispItem = ((*sel - _17CC) / pMenu->colNum + 0x01) * pMenu->colNum;
    }
_6982:
    *sel -= pMenuEnv->startDispItem;
    return 0x01;
}

// 00EA59E4 - 00EA5F1C
UINT8 _00EA59E4(UINT8 sel, PtrGuiMenu pMenu, PtrGuiMenuEnv	pMenuEnv)
{
    UINT8 _17C0 = 0x00;
    UINT8 _17CA = pMenuEnv->startDispItem;
    if (pMenu->itemNum - pMenuEnv->startDispItem >= pMenuEnv->maxDispItem)
    {
    _6A5C:
        pMenuEnv->dispItemNum = pMenuEnv->maxDispItem;
    }
    else
    {
    _6A9A:
        pMenuEnv->dispItemNum = pMenu->itemNum - pMenuEnv->startDispItem;
    }
_6AF1:
    if (sel > pMenuEnv->dispItemNum - 0x01)
    {
    _6B16:
        sel = pMenuEnv->dispItemNum - 0x01;
    }
_6B2C:
    UINT8 _17C5 = pMenuEnv->x1;
    if (_17C5 > 0x009E)
    {
    _6B5E:
        _17C5 = 0x9E;
    }
_6B64:
    SysLcdPartClear(pMenuEnv->x0, pMenuEnv->y0, _17C5, pMenuEnv->y1);
    if (pMenu->style & 0x01)
    {
    _6BDF:
        _17C0 = 0x10;
    }
_6BE5:
    for (UINT8 _17C4 = 0x00; _17C4 < pMenuEnv->dispItemNum; _17C4++)
    {
    _6C19:
        UINT8 _17C3 = pMenu->colPos[_17C4 % pMenu->colNum];
        UINT8 _17C6 = _17C4 / pMenu->colNum * 0x10 + pMenuEnv->y0;
        if (pMenu->style & 0x01 && _17C4 != sel)
        {
        _6CD2:
            UINT8 _17C7 = pMenu->colPos[(_17CA + _17C4) % pMenu->colNum] + pMenuEnv->x0;
            SysPicture(_17C7, _17C6, _17C7 + 0x0F, _17C6 + 0x0F, pMenu->menuItems[(_17CA + _17C4)]->bmpData0, 0x00);
        }
    _6E14:
        SysPrintString(pMenuEnv->x0 + _17C0 + _17C3, _17C6, pMenu->menuItems[(_17CA + _17C4)]->str);
    }
_6ED0:
    return _00EA5F1D(sel, sel, pMenu, pMenuEnv);
}

// 00EA5F1D - 00EA653F
UINT8 _00EA5F1D(UINT8 _17CF, UINT8 sel, PtrGuiMenu pMenu, PtrGuiMenuEnv	pMenuEnv)
{
    UINT8 _17C6 = pMenuEnv->startDispItem;
    if (_17CF != sel)
    {
    _6F51:
        UINT8 _17C3 = 0x00;
        UINT8 _17CA = pMenuEnv->x0 + pMenu->colPos[sel % pMenu->colNum];
        UINT8 _17C9 = sel / pMenu->colNum * 0x10 + pMenuEnv->y0;
        if (pMenu->style & 0x01)
        {
        _701A:
            SysPicture(_17CA, _17C9, _17CA + 0x0F, _17C9 + 0x0F, pMenu->menuItems[_17C6 + sel]->bmpData0, 0x00);
            _17C3 = 0x10;
        }
    _70E5:
        SysLcdReverse(_17CA + _17C3, _17C9, pMenu->menuItems[_17C6 + sel]->strLen * 0x08 + _17CA + _17C3 - 0x02, _17C9 + 0x0F);
    }
    // 感觉有bug，感觉这里应该有else，但汇编上没有
_71A0:
    UINT8 _17C3 = 0x00;
    UINT8 _17CA = pMenuEnv->x0 + pMenu->colPos[_17CF % pMenu->colNum];
    UINT8 _17C9 = _17CF / pMenu->colNum * 0x10 + pMenuEnv->y0;
    if (pMenu->style & 0x01)
    {
    _7269:
        SysPicture(_17CA, _17C9, _17CA + 0x0F, _17C9 + 0x0F, pMenu->menuItems[_17C6 + _17CF]->bmpData1, 0x00);
        _17C3 = 0x10;
    }
_7334:
    SysLcdReverse(_17CA + _17C3, _17C9, pMenu->menuItems[_17C6 + _17CF]->strLen * 0x08 + _17CA + _17C3 - 0x02, _17C9 + 0x0F);
    SysIconSetLeftScrollBar((pMenuEnv->startDispItem + _17CF + 0x0001) * 0x0064 / pMenu->itemNum);
    if (pMenuEnv->startDispItem + _17CF + 0x01 > 0x01)
    {
    _74B6:
        SysIconScrollBarUpArrow(0x01);
    }
    else
    {
        _74C6:
        SysIconScrollBarUpArrow(0x00);
    }
_74D3:
    if (pMenuEnv->startDispItem + _17CF + 0x01 < pMenu->itemNum)
    {
    _750B:
        SysIconScrollBarDownArrow(0x01);
    }
    else
    {
    _751B:
        SysIconScrollBarDownArrow(0x00);
    }
_7528:
    return 0x01;
}

// 00EA6F0D - 00EA7194
void _00EA6F0D(UINT8 sel) // DispYesNoIcon
{
    /*
███████████████████████████████████████
█                                                                          █
█                                                                          ██
█              █████                                                  ██
█              █      █                    █                  █        ██
█              █████                    █  █          █  █        ██
█              █      █                  █      █      █      █      ██
█              █████                  █        █  █        █      ██
█                                          █          █          █      ██
█          █████████              █          █          █      ██
█                  █                      █          █          █      ██
█              █  ███                  █          █          █      ██
█              █  █                      █          █          █      ██
█              ███                        █        █        █        ██
█            █      █                      █                  █        ██
█        ██          ███                                              ██
█                                                                          ██
█                                                                          ██
████████████████████████████████████████
    ██████████████████████████████████████
    */
    UINT8 _8B22[120] = { 0xFF,0xFF,0xFF,0xFF,0xFE,0x80,0x00,0x00,0x00,0x02,0x80,0x00,0x00,0x00,0x03,0x80,0xF8,0x00,0x00,0x03,0x80,0x88,0x01,0x00,0x43,0x80,0xF8,0x01,0x41,0x43,0x80,0x88,0x02,0x22,0x23,0x80,0xF8,0x02,0x14,0x23,0x80,0x00,0x02,0x08,0x23,0x83,0xFE,0x02,0x08,0x23,0x80,0x20,0x02,0x08,0x23,0x80,0xB8,0x02,0x08,0x23,0x80,0xA0,0x02,0x08,0x23,0x80,0xE0,0x01,0x08,0x43,0x81,0x10,0x01,0x00,0x43,0x86,0x0E,0x00,0x00,0x03,0x80,0x00,0x00,0x00,0x03,0x80,0x00,0x00,0x00,0x03,0xFF,0xFF,0xFF,0xFF,0xFF,0x3F,0xFF,0xFF,0xFF,0xFF };
    /*
███████████████████████████████████████
█                                                                          █
█  █  █  █  █  █  █  █  █  █  █  █  █  █  █  █  █  █  █  ██
█        █████████                                                ██
█  █              █                        █                  █    █  ██
█                  █                        █  ██        █  █        ██
█  █            █  █                    █    █  █      █    █  █  ██
█            ███    █                  █    █  █      █    █      ██
█  █  ███    █      █                █    █    █    █    █  █  ██
█                █                        █    █    █    █    █      ██
█  █            █                        █    █    █    █    █  █  ██
█          ███████                  █    █      █  █    █      ██
█  █      █          █                  █    █      █  █    █  █  ██
█          █          █                    █  █        ██  █        ██
█  █      █          █                    █                  █    █  ██
█          ███████                                                  ██
█  █  █  █  █  █  █  █  █  █  █  █  █  █  █  █  █  █  █  ██
█                                                                          ██
████████████████████████████████████████
    ██████████████████████████████████████
    */
    UINT8 _8C4E[120] = {0xFF,0xFF,0xFF,0xFF,0xFE,0x80,0x00,0x00,0x00,0x02,0xAA,0xAA,0xAA,0xAA,0xAB,0x87,0xFC,0x00,0x00,0x03,0xA0,0x20,0x01,0x00,0x4B,0x80,0x20,0x01,0x61,0x43,0xA0,0x50,0x02,0x51,0x2B,0x81,0xC8,0x02,0x51,0x23,0xAE,0x44,0x02,0x49,0x2B,0x80,0x40,0x02,0x49,0x23,0xA0,0x40,0x02,0x49,0x2B,0x83,0xF8,0x02,0x45,0x23,0xA2,0x08,0x02,0x45,0x2B,0x82,0x08,0x01,0x43,0x43,0xA2,0x08,0x01,0x00,0x4B,0x83,0xF8,0x00,0x00,0x03,0xAA,0xAA,0xAA,0xAA,0xAB,0x80,0x00,0x00,0x00,0x03,0xFF,0xFF,0xFF,0xFF,0xFF,0x3F,0xFF,0xFF,0xFF,0xFF};
    /*
███████████████████████████████████████
█                                                                          █
█                                                                          ██
█        █████████                                                ██
█                  █                        █                  █        ██
█                  █                        █  ██        █  █        ██
█                █  █                    █    █  █      █    █      ██
█            ███    █                  █    █  █      █    █      ██
█      ███    █      █                █    █    █    █    █      ██
█                █                        █    █    █    █    █      ██
█                █                        █    █    █    █    █      ██
█          ███████                  █    █      █  █    █      ██
█          █          █                  █    █      █  █    █      ██
█          █          █                    █  █        ██  █        ██
█          █          █                    █                  █        ██
█          ███████                                                  ██
█                                                                          ██
█                                                                          ██
████████████████████████████████████████
    ██████████████████████████████████████
    */
    UINT8 _8BEA[120] = {0xFF,0xFF,0xFF,0xFF,0xFE,0x80,0x00,0x00,0x00,0x02,0x80,0x00,0x00,0x00,0x03,0x87,0xFC,0x00,0x00,0x03,0x80,0x20,0x01,0x00,0x43,0x80,0x20,0x01,0x61,0x43,0x80,0x50,0x02,0x51,0x23,0x81,0xC8,0x02,0x51,0x23,0x8E,0x44,0x02,0x49,0x23,0x80,0x40,0x02,0x49,0x23,0x80,0x40,0x02,0x49,0x23,0x83,0xF8,0x02,0x45,0x23,0x82,0x08,0x02,0x45,0x23,0x82,0x08,0x01,0x43,0x43,0x82,0x08,0x01,0x00,0x43,0x83,0xF8,0x00,0x00,0x03,0x80,0x00,0x00,0x00,0x03,0x80,0x00,0x00,0x00,0x03,0xFF,0xFF,0xFF,0xFF,0xFF,0x3F,0xFF,0xFF,0xFF,0xFF};
    /*
███████████████████████████████████████
█                                                                          █
█  █  █  █  █  █  █  █  █  █  █  █  █  █  █  █  █  █  █  ██
█              █████                                                  ██
█  █          █      █                    █                  █    █  ██
█              █████                    █  █          █  █        ██
█  █          █      █                  █      █      █      █  █  ██
█              █████                  █        █  █        █      ██
█  █                                      █          █          █  █  ██
█          █████████              █          █          █      ██
█  █              █                      █          █          █  █  ██
█              █  ███                  █          █          █      ██
█  █          █  █                      █          █          █  █  ██
█              ███                        █        █        █        ██
█  █        █      █                      █                  █    █  ██
█        ██          ███                                              ██
█  █  █  █  █  █  █  █  █  █  █  █  █  █  █  █  █  █  █  ██
█                                                                          ██
████████████████████████████████████████
    ██████████████████████████████████████
    */
    UINT8 _8B86[120] = {0xFF,0xFF,0xFF,0xFF,0xFE,0x80,0x00,0x00,0x00,0x02,0xAA,0xAA,0xAA,0xAA,0xAB,0x80,0xF8,0x00,0x00,0x03,0xA0,0x88,0x01,0x00,0x4B,0x80,0xF8,0x01,0x41,0x43,0xA0,0x88,0x02,0x22,0x2B,0x80,0xF8,0x02,0x14,0x23,0xA0,0x00,0x02,0x08,0x2B,0x83,0xFE,0x02,0x08,0x23,0xA0,0x20,0x02,0x08,0x2B,0x80,0xB8,0x02,0x08,0x23,0xA0,0xA0,0x02,0x08,0x2B,0x80,0xE0,0x01,0x08,0x43,0xA1,0x10,0x01,0x00,0x4B,0x86,0x0E,0x00,0x00,0x03,0xAA,0xAA,0xAA,0xAA,0xAB,0x80,0x00,0x00,0x00,0x03,0xFF,0xFF,0xFF,0xFF,0xFF,0x3F,0xFF,0xFF,0xFF,0xFF};
    UINT8* _8CB2[] = {_8B86, _8BEA, _8B22, _8C4E};
    UINT8* _17CB = (UINT8*)SysMemAllocate(0x0078);
    for (UINT8 _17CA = 0x00; _17CA < 0x78; _17CA++)
    {
    _7F74:
        _17CB[_17CA] = _8CB2[0x0002 * sel][_17CA];
    }
_8017:
    SysPicture(0x1D, 0x31, 0x44, 0x44, _17CB, 0x00);
    for (UINT8 _17CA = 0x00; _17CA < 0x78; _17CA++)
    {
        _8079:
        _17CB[_17CA] = _8CB2[0x0002 * sel+1][_17CA];
    }
    _811C:
    SysPicture(0x56, 0x31, 0x7D, 0x44, _17CB, 0x00);
    SysMemFree((char*)_17CB);
}
// 00EA802D - 00EA8457
void _00EA802D() // InputOpen?
{
    UINT8 _6046[0x11] = { 0x23,0x5F,0x24,0x73,0x59,0x53,0x63,0x48,0x4E,0x69,0x4E,0x50,0x54,0x24,0x5F,0x23,0x00 };
    UINT8 _6057[0x10] = { 0xC3,0xBB,0xD3,0xD0,0xCA,0xE4,0xC8,0xEB,0xB7,0xA8,0xCA,0xFD,0xBE,0xDD,0x21,0x00 };
    SysCursorReadParam(MCU_memory + 0x2202);
    if (MCU_memory[0x2206] == 0x01)
    {
    _505A:
        CloseCursor();
    }
_5065:
    UINT8 y = 0x00;
    do
    {
        _5069:
        MCU_memory[0x220B + y] = 0x00;
        y++;
    } while (y < 0x1C);
_5071:
    *(UINT16*)(MCU_memory + 0x2209) = 0x84CC; // *(UINT16*)(MCU_memory+0x3E9)
    *(UINT16*)(MCU_memory + 0x2209) >>= 4;
    // DataBankSwitch(0x09, 0x04, 0x084C)
    DataBankSwitch(0x09, 0x04, *(UINT16*)(MCU_memory + 0x2209));
    // *(UINT16*)(MCU_memory + 0x3E8)的值为：0xCCE0，下行代码计算得到的值为0x9CE0
    *(UINT16*)(MCU_memory + 0x94) = (*(UINT16*)(MCU_memory + 0x3E8) & 0x0FFF) + 0x9000;
    //_50CD:
    y = 0x00;
    for (;;)
    {
        if (MCU_memory[*(UINT16*)(MCU_memory + 0x94) + y] == _6046[y]) // todo
        {
        _50D6:
            y++;
            if (y < 0x10)
            {
            _50CF:
                continue;
            }
            else
            {
            _512A:
                MCU_memory[0x226E] = MCU_memory[*(UINT16*)(MCU_memory + 0x94) + y];
                y++;
                MCU_memory[0x2253] = MCU_memory[*(UINT16*)(MCU_memory + 0x94) + y];
                y++;
                MCU_memory[0x2254] = MCU_memory[*(UINT16*)(MCU_memory + 0x94) + y];
                y++;
                MCU_memory[0x2255] = MCU_memory[*(UINT16*)(MCU_memory + 0x94) + y];
                y++;
                MCU_memory[0x226F] = MCU_memory[*(UINT16*)(MCU_memory + 0x94) + y];
                y++;
                MCU_memory[0x2270] = MCU_memory[*(UINT16*)(MCU_memory + 0x94) + y];
                if (MCU_memory[0x2200] >= MCU_memory[0x226E])
                {
                _5158:
                    MCU_memory[0x2200] = 0x00;
                }
                _515D:
                MCU_memory[0x2247] = 0xE0; // MCU_memory[0x3E8]
                MCU_memory[0x2248] = 0xCC; // MCU_memory[0x3E9]
                MCU_memory[0x2249] = 0x84; // MCU_memory[0x3EA]
                y = (MCU_memory[0x2200] << 1) + MCU_memory[0x2200] + 0x16;
                UINT32 tmp32 = *(UINT32*)(MCU_memory + *(UINT16*)(MCU_memory + 0x94) + y) + *(UINT32*)(MCU_memory+0x2247);
                MCU_memory[0x2247] = tmp32;
                MCU_memory[0x2248] = tmp32>>8;
                MCU_memory[0x2249] = tmp32>>16;
                tmp32 = *(UINT32*)(MCU_memory + 0x2253) + 0x84CCE0; // *(UINT24*)(MCU_memory + 0x3E8)
                MCU_memory[0x2253] = tmp32;
                MCU_memory[0x2254] = tmp32 >> 8;
                MCU_memory[0x2255] = tmp32 >> 16;
                *(UINT16*)(MCU_memory + 0x2257) = *(UINT16*)(MCU_memory + 0x226F) + 0x0001;
                MCU_memory[0x2259] = 0x00;
                tmp32 = *(UINT32*)(MCU_memory + 0x2257) << 2;
                tmp32 += *(UINT32*)(MCU_memory + 0x2253);
                MCU_memory[0x2257] = tmp32;
                MCU_memory[0x2258] = tmp32 >> 8;
                MCU_memory[0x2259] = tmp32 >> 16;
                *(UINT16*)(MCU_memory + 0x2209) = *(UINT16*)(MCU_memory + 0x2248);
                *(UINT16*)(MCU_memory + 0x2209) >>= 4;
                DataBankSwitch(0x09, 0x04, *(UINT16*)(MCU_memory + 0x2209));
                *(UINT16*)(MCU_memory + 0x94) = (*(UINT16*)(MCU_memory + 0x2247) & 0x0FFF) + 0x9000;
                y = 0x90;
                UINT8 x = 0x00;
                do
                {
                    MCU_memory[0x2227 + x] = MCU_memory[*(UINT16*)(MCU_memory + 0x94) + y];
                    y++;
                    x++;
                } while (x < 0x20);
            _5261:
                tmp32 = *(UINT32*)(MCU_memory + *(UINT16*)(MCU_memory + 0x94) + y) + *(UINT32*)(MCU_memory + 0x2247);
                MCU_memory[0x224B] = tmp32;
                MCU_memory[0x224C] = tmp32 >> 8;
                MCU_memory[0x224D] = tmp32 >> 16;
                y += 4;
                MCU_memory[0x225C] = MCU_memory[*(UINT16*)(MCU_memory + 0x94) + y];
                y++;
                MCU_memory[0x225D] = MCU_memory[*(UINT16*)(MCU_memory + 0x94) + y];
                y++;
                MCU_memory[0x224F] = MCU_memory[*(UINT16*)(MCU_memory + 0x94) + y];
                y++;
                MCU_memory[0x225B] = MCU_memory[*(UINT16*)(MCU_memory + 0x94) + y];
                y++;
                MCU_memory[0x2250] = MCU_memory[*(UINT16*)(MCU_memory + 0x94) + y];
                y++;
                MCU_memory[0x2251] = MCU_memory[*(UINT16*)(MCU_memory + 0x94) + y];
                y++;
                MCU_memory[0x2252] = MCU_memory[*(UINT16*)(MCU_memory + 0x94) + y];
                y++;
                MCU_memory[0x225E] = MCU_memory[*(UINT16*)(MCU_memory + 0x94) + y];
                SysLcdPartClear(0x00, MCU_memory[0x2251], 0x9E, 0x5F);
                MCU_memory[0x225F] = 0x00;
                for (;;)
                {
                    _52DF:
                    y = MCU_memory[0x225F];
                    UINT8 a = MCU_memory[*(UINT16*)(MCU_memory + 0x94) + y];
                    if (a == 0x00)
                    {
                    _5362:
                        if (MCU_memory[0x2250] == 0x01)
                        {
                        _536C:
                            SysLcdReverse(0x00, MCU_memory[0x2251], MCU_memory[0x2226] - 0x01, MCU_memory[0x2251] + 0x10 - 0x01);
                        }
                    _53A4:
                        if (MCU_memory[0x225B])
                        {
                        _53AC:
                            x = 0x00;
                            y = 0x10;
                            for (;;)
                            {
                                _53B0:
                                a = MCU_memory[*(UINT16*)(MCU_memory + 0x94) + y];
                                if (a)
                                {
                                    if (a < 0x80)
                                    {
                                    _53B8:
                                        y++;
                                        x++;
                                    }
                                    else
                                    {
                                    _53BD:
                                        y += 2;
                                        x++;
                                    }
                                }
                                else
                                {
                                    break;
                                }
                            }
                        _53C3:
                            MCU_memory[0x221F] = x;
                            *(UINT16*)(MCU_memory + 0x94) += 0x0010;
                            if (MCU_memory[0x2252] + MCU_memory[0x221D] < MCU_memory[0x221F])
                            {
                            _53DF:
                                a = MCU_memory[0x2252];
                            }
                            else
                            {
                            _53E5:
                                a = MCU_memory[0x221F] - MCU_memory[0x221D];
                            }
                        _53EC:
                            MCU_memory[0x221C] = a;
                            if (MCU_memory[0x2250] != 0x01)
                            {
                            _53F6:
                                MCU_memory[0x2251] += 0x10;
                            }
                        _53FF:
                            _00EA8AB9();
                        }
                        break;
                    }
                    else if (a >= 0x80)
                    {
                    _5320:
                        MCU_memory[0x225F]++;
                        y = MCU_memory[0x225F];
                        SysChinese(MCU_memory[0x2226], MCU_memory[0x2251], (UINT16)(a << 8) + MCU_memory[*(UINT16*)(MCU_memory + 0x94) + y]);
                        MCU_memory[0x225F]++;
                        MCU_memory[0x2226] += 0x10;
                    }
                    else
                    {
                    _52EA:
                        SysAscii(MCU_memory[0x2226], MCU_memory[0x2251], a);
                    }
                    MCU_memory[0x225F]++;
                    MCU_memory[0x2226] += 0x08;
                }
            }
        }
        else
        {
        _50DE:
            y = 0x00;
            do {
                MCU_memory[0x220B + y] = _6057[y];
                y++;
            } while (MCU_memory[0x220B + y - 1]);
        _50EB:
            SysPrintString(0x00, 0x50, MCU_memory + 0x220B);
            MCU_memory[0x2250] = 0x01;
            MCU_memory[0x2251] = 0x50;
            MCU_memory[0x226E] = 0x00;
            goto _5402;
        }
    }
    _5402:
    DataBankSwitch(0x09, 0x04, *(UINT16*)(MCU_memory + 0x2207));
    if (MCU_memory[0x2206] == 0x01)
    {
    _5431:
        SysCursorWriteParam(MCU_memory + 0x2202);
    }
}

// 00EA8AB9 - 00EA8B8A
void _00EA8AB9()
{
    if (MCU_memory[0x2250] == 0x01)
    {
        MCU_memory[0x2260] = MCU_memory[0x2226];
    }
    else
    {
        MCU_memory[0x2260] = 0x00;
    }
    SysLcdPartClear(MCU_memory[0x2260], MCU_memory[0x2251], 0x9E, 0x5F);
    MCU_memory[0x225F] = 0x00;
    MCU_memory[0x2260] = 0x00;
    for (;;)
    {
        _5AFB:
        UINT8 x = MCU_memory[0x2261];
        if (x < MCU_memory[0x221C])
        {
            UINT8 y = MCU_memory[0x225F];
            if (MCU_memory[*(UINT16*)(MCU_memory + 0x94) + y] < 0x80)
            {
            _5B0C:
                SysAscii(MCU_memory[0x2260], MCU_memory[0x2251], MCU_memory[*(UINT16*)(MCU_memory + 0x94) + y]);
                MCU_memory[0x225F]++;
                MCU_memory[0x2261]++;
                MCU_memory[0x2260] += 0x10;
            }
            else
            {
            _5B46:
                UINT8 a = MCU_memory[*(UINT16*)(MCU_memory + 0x94) + y];
                MCU_memory[0x225F]++;
                y = MCU_memory[0x225F];
                SysChinese(MCU_memory[0x2260], MCU_memory[0x2251], (a << 8) + MCU_memory[*(UINT16*)(MCU_memory + 0x94) + y]);
                MCU_memory[0x225F]++;
                MCU_memory[0x2261]++;
                MCU_memory[0x2260] += 0x10;
            }
        }
        else
        {
            return;
        }
    }
}

// 00EA8B8B - 00EA8D76
UINT8 _00EA8B8B()
{
    *(UINT32*)(MCU_memory + 0x2268) = 0x00000000;
    _5B99:
    MCU_memory[0x2260] = MCU_memory[0x226C];
    MCU_memory[0x2261] = (MCU_memory[0x2260] << 7) + (MCU_memory[0x2260] >> 1);
    *(UINT16*)(MCU_memory + 0x226A) = *(UINT16*)(MCU_memory + 0x2260) + *(UINT16*)(MCU_memory + 0x2268);
    *(UINT16*)(MCU_memory + 0x2262) = (MCU_memory[0x224F] + 0x02) & 0x00FF;
    *(UINT16*)(MCU_memory + 0x2264) = *(UINT16*)(MCU_memory + 0x226A);
    _00EA8D77();
    UINT32 tmp = ((UINT32)MCU_memory[0x2262] << 16) + *(UINT16*)(MCU_memory + 0x2266) + *(UINT32*)(MCU_memory + 0x2221);
    *(UINT16*)(MCU_memory + 0x2266) = tmp;
    MCU_memory[0x2262] = tmp >> 16;
    *(UINT16*)(MCU_memory + 0x98) = (*(UINT16*)(MCU_memory + 0x2266) & 0x0FFF) + 0x9000;
    tmp >>= 4;
    MCU_memory[0x2267] = tmp >> 8;
    MCU_memory[0x2262] = tmp >> 16;
    DataBankSwitch(0x09, 0x04, tmp >> 8);
    UINT8 x;
    UINT8 y = 0x00;
    for (;;)
    {
        _5C47:
        if (MCU_memory[0x220B + y] < flash_emu_read(*(UINT16*)(MCU_memory + 0x98) + y))
        {
        _5C55:
            x = 0xFF;
            break;
        }
        else if (MCU_memory[0x220B + y] == flash_emu_read(*(UINT16*)(MCU_memory + 0x98) + y))
        {
        _5C5A:
            y++;
            if (MCU_memory[0x225F] >= y)
            {
            _5C60:
                x = 0x00;
                break;
            }
        }
        else
        {
        _5C50:
            x = 0x01;
            break;
        }
    }
_5C62:
    if (*(UINT16*)(MCU_memory + 0x226C) == 0x0001)
    {
    _5C6E:
        if (x)
        {
        _5C72:
            tmp = 0x00;
            goto _5D4E;
        }
        goto _5CB1;
    }
    _5C78:
    if (x == 0xFF)
    {
    _5C7C:
        *(UINT16*)(MCU_memory + 0x226C) = *(UINT16*)(MCU_memory + 0x2260);
        goto _5B99;
    }
    else if (x == 0x01)
    {
    _5C8F:
        *(UINT16*)(MCU_memory + 0x2268) = *(UINT16*)(MCU_memory + 0x226A);
        *(UINT16*)(MCU_memory + 0x226C) -= *(UINT16*)(MCU_memory + 0x2260);
        goto _5B99;
    }
_5CB1:
    DataBankSwitch(0x09, 0x04, ((UINT16)MCU_memory[0x2262] << 8) + MCU_memory[0x2267] - 0x0002);
    *(UINT16*)(MCU_memory + 0x98) += 0x2000;
    MCU_memory[0x2260] = 0x02 + MCU_memory[0x224F];
    _5CF3:
    *(UINT16*)(MCU_memory + 0x98) -= MCU_memory[0x2260];
    y = 0x00;
    while (MCU_memory[0x220B + y] == flash_emu_read(*(UINT16*)(MCU_memory + 0x98) + y))
    {
    _5D0D:
        y++;
        if (MCU_memory[0x225F] >= y)
        {
        _5D13:
            goto _5CF3;
        }
    }
    _5D16:
    *(UINT16*)(MCU_memory + 0x98) += MCU_memory[0x2260];
    y = MCU_memory[0x224F];
    MCU_memory[0x2262] = flash_emu_read(*(UINT16*)(MCU_memory + 0x98) + y);
    y++;
    MCU_memory[0x2263] = flash_emu_read(*(UINT16*)(MCU_memory + 0x98) + y);
    y += MCU_memory[0x224F];
    y++;
    MCU_memory[0x2266] = flash_emu_read(*(UINT16*)(MCU_memory + 0x98) + y) - MCU_memory[0x2262];
    y++;
    MCU_memory[0x2267] = flash_emu_read(*(UINT16*)(MCU_memory + 0x98) + y) - MCU_memory[0x2263];
    tmp = 0x01;
_5D4E:
    DataBankSwitch(0x09, 0x04, *(UINT16*)(MCU_memory + 0x2209));
    return tmp;
}

// 00EA8D77 - 00EA8DAA
void _00EA8D77()
{
    *(UINT16*)(MCU_memory + 0x2266) = 0x0000;
    UINT8 y = 0x10;
    do
    {
        _5D81:
        UINT32 tmp = ((UINT32)(*(UINT16*)(MCU_memory + 0x2262)) << 16) + *(UINT16*)(MCU_memory + 0x2266);
        UINT32 flag = tmp & 0x00000001;
        tmp <<= 1;
        *(UINT16*)(MCU_memory + 0x2266) = tmp;
        *(UINT16*)(MCU_memory + 0x2262) = tmp >> 16;
        if (flag)
        { // 进位为1
        _5D8F:
            tmp = (UINT32)(*(UINT16*)(MCU_memory + 0x2266)) + *(UINT16*)(MCU_memory + 0x2264);
            flag = tmp & 0x00010000;
            if (flag)
            {
            _5DA4:
                MCU_memory[0x2262]++;
            }
        }
    _5DA7:
        y--;
    } while (y);
}

// 00EA90F3 - 00EA9302
void _00EA90F3(UINT8 a, UINT8* _17D0, UINT16 _17D2)
{
    MCU_memory[0x2400] = a;
    *(UINT16*)(MCU_memory + 0xC2) = _17D0;
    *(UINT16*)(MCU_memory + 0xC4) = _17D0;
    *(UINT16*)(MCU_memory + 0x2401) = _17D2; // Shurufa_Addr = (_17D2<<8)+a
    *(UINT16*)(MCU_memory + 0x2403) = 0x0001;
    for (;;)
    {
        _611C:
        *(UINT16*)(MCU_memory + *(UINT16*)(MCU_memory + 0xC2)) = *(UINT16*)(MCU_memory + 0x2403);
        if (*(UINT16*)(MCU_memory + 0x2403) != *(UINT16*)(MCU_memory + 0x2401))
        {
        _613C:
            *(UINT16*)(MCU_memory + 0x2403) += 0x0001;
            *(UINT16*)(MCU_memory + 0xC2) += 0x0002;
        }
        else
        {
            break;
        }
    }
_615D:
    *(UINT16*)(MCU_memory + 0x246A) = 0x0001;
_6167:
    for (;;)
    {
        if (*(UINT16*)(MCU_memory + 0x246A) != *(UINT16*)(MCU_memory + 0x2401))
        {
        _6177:
            *(UINT16*)(MCU_memory + 0xC2) = *(UINT16*)(MCU_memory + 0xC4);
            *(UINT16*)(MCU_memory + 0x246C) = *(UINT16*)(MCU_memory + 0x246A);
            *(UINT16*)(MCU_memory + 0x246C) <<= 1;
            *(UINT16*)(MCU_memory + 0xC2) += *(UINT16*)(MCU_memory + 0x246C);
            *(UINT16*)(MCU_memory + 0xC8) = 0x2413;
            _00EA9303();
            *(UINT16*)(MCU_memory + 0x2409) = 0x0000;
            *(UINT16*)(MCU_memory + 0x240B) = *(UINT16*)(MCU_memory + 0x246A);
        }
        else
        {
        _61C5:
            return;
        }
    _61CB:
        while (*(UINT16*)(MCU_memory + 0x240B) > *(UINT16*)(MCU_memory + 0x2409))
        {
        _61DF:
            *(UINT16*)(MCU_memory + 0x240D) = *(UINT16*)(MCU_memory + 0x240B) + *(UINT16*)(MCU_memory + 0x2409);
            *(UINT16*)(MCU_memory + 0x240D) >>= 1;
            *(UINT16*)(MCU_memory + 0xC2) = *(UINT16*)(MCU_memory + 0xC4);
            *(UINT16*)(MCU_memory + 0xCE) = *(UINT16*)(MCU_memory + 0x240D);
            *(UINT16*)(MCU_memory + 0xCE) <<= 1;
            *(UINT16*)(MCU_memory + 0xC2) += *(UINT16*)(MCU_memory + 0xCE);
            *(UINT16*)(MCU_memory + 0xC8) = 0x2433;
            _00EA9303();
            if (_00EA93C0() == 0xFF)
            {
            _6242:
                *(UINT16*)(MCU_memory + 0x240B) = *(UINT16*)(MCU_memory + 0x240D);
            }
            else
            {
            _622E:
                *(UINT16*)(MCU_memory + 0x2409) = *(UINT16*)(MCU_memory + 0x240D) + 0x0001;
                goto _61CB;
            }
        }
    _6251:
        *(UINT16*)(MCU_memory + 0x246E) = *(UINT16*)(MCU_memory + 0x246A);
        while (*(UINT16*)(MCU_memory + 0x246E) > *(UINT16*)(MCU_memory + 0x2409))
        {
        _6277:
            *(UINT16*)(MCU_memory + 0xC2) = *(UINT16*)(MCU_memory + 0xC4);
            *(UINT16*)(MCU_memory + 0xCE) = *(UINT16*)(MCU_memory + 0x246E);
            *(UINT16*)(MCU_memory + 0xCE) <<= 1;
            *(UINT16*)(MCU_memory + 0xCE) += *(UINT16*)(MCU_memory + 0xC2);
            *(UINT16*)(MCU_memory + 0xD2) = *(UINT16*)(MCU_memory + 0xCE);
            *(UINT16*)(MCU_memory + 0xD0) = 0x0001;
            *(UINT16*)(MCU_memory + 0xD0) <<= 1;
            *(UINT16*)(MCU_memory + 0xCE) -= *(UINT16*)(MCU_memory + 0xD0);
            *(UINT16*)(MCU_memory + 0xD4) = *(UINT16*)(MCU_memory + *(UINT16*)(MCU_memory + 0xCE));
            *(UINT16*)(MCU_memory + *(UINT16*)(MCU_memory + 0xCE)) = *(UINT16*)(MCU_memory + *(UINT16*)(MCU_memory + 0xD2));
            *(UINT16*)(MCU_memory + *(UINT16*)(MCU_memory + 0xD2)) = *(UINT16*)(MCU_memory + 0xD4);
            *(UINT16*)(MCU_memory + 0x246E) -= 0x0001;
        }
    _62ED:
        *(UINT16*)(MCU_memory + 0x246A) += 0x0001;
    }
}

// 00EA9303 - 00EA93BF
void _00EA9303()
{
    MCU_memory[0x2411] = FileSearch(MCU_memory[0x2400], *(UINT16*)(MCU_memory + 0xC2), (UINT16*)(MCU_memory + 0x2460), MCU_memory + 0x2456);
    *(UINT16*)(MCU_memory + 0x2466) = MCU_bankaddresslist[0x09];
    MCU_memory[0x2461] += 0x20;
    *(UINT16*)(MCU_memory + 0x2460) >>= 4;
    MCU_bankaddresslist[0x09] = *(UINT16*)(MCU_memory + 0x2460);
    *(UINT16*)(MCU_memory + 0xC6) = 0x9006;
    UINT8 y = 0x00;
    do
    {
        _639F:
        MCU_memory[*(UINT16*)(MCU_memory + 0xC8)] = MCU_memory[*(UINT16*)(MCU_memory + 0xC6)];
        y++;
    } while (y != 0x20);
_63AB:
    MCU_bankaddresslist[0x09] = *(UINT16*)(MCU_memory + 0x2466);
}

// 00EA93C0 - 00EA941D
UINT8 _00EA93C0()
{
    *(UINT16*)(MCU_memory + 0xCA) = 0x2433;
    *(UINT16*)(MCU_memory + 0xCC) = 0x2413;
    UINT8 x = 0x00;
    UINT8 y;
    while (x)
    {
    _63D7:
        x--;
        y = 0x00;
        _63DA:
        if (MCU_memory[*(UINT16*)(MCU_memory + 0xCC)+y] == MCU_memory[*(UINT16*)(MCU_memory + 0xCA)+y])
        {
        _63E0:
            if (y < 0xFF)
            {
                _63E4:
                y++;
                goto _63DA;
            }
            else
            {
            _63E8:
                *(UINT16*)(MCU_memory + 0xCC) += 0x0100;
                *(UINT16*)(MCU_memory + 0xCA) += 0x0100;
                continue;
            }
        }
        else if (MCU_memory[*(UINT16*)(MCU_memory + 0xCC) + y] < MCU_memory[*(UINT16*)(MCU_memory + 0xCA) + y])
        {
            return 0xFF;
        }
        else
        {
            return 0x01;
        }
    }
_63F9:
    x = 0x20;
    y = 0x00;
    _63FE:
    if (x == 0x00)
    {
        return 0x00;
    }
    if (MCU_memory[*(UINT16*)(MCU_memory + 0xCC) + y] == MCU_memory[*(UINT16*)(MCU_memory + 0xCA) + y])
    {
    _6408:
        y++;
        x--;
        goto _63FE;
    }
    else if (MCU_memory[*(UINT16*)(MCU_memory + 0xCC) + y] < MCU_memory[*(UINT16*)(MCU_memory + 0xCA) + y])
    {
        return 0xFF;
    }
    else
    {
        return 0x01;
    }
}

// 00EACD37 - 00EACD4B
void _00EACD37()
{
    shMainMenuStart = 0x00;
    shSubMenuStart = 0x00;
    shMainMenuSel = 0x00;
    shSubMenuSel = 0x00;
}

// 00EB4001 - 00EB4111
void _00EB4001()
{
    MCU_memory[0x2152] = 0x00;
    // m_fls_SectorList = 0x01;m_fls_Capacity = 0x00;m_fls_BlgIndex = 0x00;
    fun_fls_init2();
    UINT8 a = m_fls_SectorList;
    goto _502B;
    _5012:
    MCU_memory[0x2152] = 0x00;
    m_fls_Capacity++;
    if (m_fls_Capacity == FLASHCAPACITY)
    {
        return;
    }
    a = m_fls_SectorList + 0x07;
    m_fls_SectorList = a;
_502B:
    m_fls_bank_4 = a;
    // BANK映射 0x04:m_fls_bank_4+0x0200
    fun_fls_SetBank4k_4();
    m_fls_output = 0x4000;
    _503F:
    if (flash_emu_read(m_fls_output) == 0x00)
    {
        _5043:
        MCU_memory[0x2152] = 0x01;
        m_fls_bank_B = m_fls_output & 0x0FFF;
        // BANK映射 0x0B:m_fls_bank_B+0x0200
        fun_fls_SetBank4k_B();
        MCU_memory[0x2195] = 0x00;
        _505C:
        // 擦除bankB映射的4K数据
        _00EB7347();
        flash_emu_write(0xB000, 0x30); // Sector-Erase
        *(UINT16*)(MCU_memory + 0x2193) = 0x0000;
        _5071:
        while (flash_emu_read(0xB000) != 0xFF)
        {
        _5078:
            *(UINT16*)(MCU_memory + 0x2193) += 1;
            if (*(UINT16*)(MCU_memory + 0x2193) >= 0xFF00)
            {
            _508A:
                m_fls_errorcode = 0x00;
                break;
            }
        }
        _508F:
        m_fls_log = 0xB000;
        m_fls_errorcode = _00EB6FCF();
        if (m_fls_errorcode != 0x01)
        {
            _50A1:
            MCU_memory[0x2195]++;
            if (MCU_memory[0x2195] < 0x08)
            {
                goto _505C;
            }
        }
    }
_50AB:
    MCU_memory[0x82]++;
    if (MCU_memory[0x82])
    {
        goto _503F;
    }
    if (MCU_memory[0x2152] == 0x00)
    {
        goto _5012;
    }
_50B7:
    MCU_memory[0x2195] = 0x00;
    _50BC:
    // 擦除bank9映射的4K数据
    _00EB7347();
    flash_emu_write(0x9000, 0x30); // Sector-Erase
    *(UINT16*)(MCU_memory + 0x2193) = 0x0000;
    _50D1:
    a = flash_emu_read(0x9000);
    if (a != 0xFF)
    {
        _50D8:
        MCU_memory[0x2193]++;
        if (MCU_memory[0x2193])
        {
            goto _50D1;
        }
        MCU_memory[0x2194]++;
        if (MCU_memory[0x2194] < 0x0FF)
        {
            goto _50D1;
        }
        _50EA:
        m_fls_errorcode = 0x00;
    }
    _50EF:
    m_fls_log = 0x9000;
    m_fls_errorcode = _00EB6FCF();
    if (m_fls_errorcode != 0x01)
    {
        _5101:
        MCU_memory[0x2195]++;
        if (MCU_memory[0x2195] < 0x08)
        {
            goto _50BC;
        }
    }
_510B:
    _00EB4112();
    goto _5012;
}
// 00EB4112 - 00EB4153
void _00EB4112()
{
    m_fls_output = 0x4000;
    _511B:
    UINT8 a = flash_emu_read(m_fls_output);
    if ((a == 0x00) || (a == 0xFF))
    {
    _511F:
        m_fls_output += 1;
        if (MCU_memory[0x83] == 0x50)
        {
        _5150:
            _00EB51FD();
            return;
        }
        else
        {
            goto _511B;
        }
    }
_5132:
    MCU_memory[0x88] = MCU_memory[0x82];
    MCU_memory[0x89] = MCU_memory[0x83] + 0x50;
    m_fls_log = m_fls_buf;
    m_fls_errorcode = _00EB74C9(flash_emu_read(m_fls_output), 0x00);
    goto _511F;
}
// 00EB4154 - 00EB41E3
// 擦除bankB里值不为0x02的地方
void _00EB4154()
{
    UINT8 y = 0x00;
    m_fls_point = 0xB000;
    m_fls_buf = 0x9000;
    MCU_memory[0x2195] = 0x00;
_5167:
    // 擦除bank9映射的4K数据
    _00EB7347();
    flash_emu_write(0x9000, 0x30); // Sector-Erase
    *(UINT16*)(MCU_memory + 0x2193) = 0x0000;
_517C:
    while (flash_emu_read(0x9000) != 0xFF)
    {
    _5183:
        *(UINT16*)(MCU_memory + 0x2193) += 1;
        if (*(UINT16*)(MCU_memory + 0x2193) = 0xFF00)
        {
        _5195:
            m_fls_errorcode = 0x00;
            break;
        }
    }
    _519A:
    m_fls_log = 0x9000;
    m_fls_errorcode = _00EB6FCF();
    if (m_fls_errorcode != 0x01)
    {
        _51AC:
        MCU_memory[0x2195]++;
        if (MCU_memory[0x2195] < 0x08)
        {
            goto _5167;
        }
    }
_51B6:
    // bankB里为0x02的值写到bank9里
    do
    {
    _51B8:
        if (flash_emu_read(m_fls_point) == 0x02)
        {
        _51BE:
            m_fls_log = m_fls_buf;
            m_fls_errorcode = _00EB74C9(0x02, 0x00);
        }
    _51CE:
        m_fls_point += 1;
        m_fls_buf += 1;
    } while (m_fls_point != 0xC000);
    // 擦除bankB映射的4K数据，再把bank9的数据写到bankB
    _00EB41E4();
}
// 00EB41E4 - 00EB4274
// 擦除bankB映射的4K数据，再把bank9的数据写到bankB
void _00EB41E4()
{
    UINT8 y = 0x00;
    MCU_memory[0x2195] = 0x00;
_51E9:
    // 擦除bankB映射的4K数据
    _00EB7347();
    flash_emu_write(0xB000, 0x30); // Sector-Erase
    *(UINT16*)(MCU_memory + 0x2193) = 0x0000;
    while (flash_emu_read(0xB000) != 0xFF)
    {
    _5205:
        MCU_memory[0x2193]++;
        if (MCU_memory[0x2193] == 0x00)
        {
            MCU_memory[0x2194]++;
            if (MCU_memory[0x2194] >= 0xFF)
            {
            _5217:
                m_fls_errorcode = 0x00;
                break;
            }
        }
    }
    _521C:
    m_fls_log = 0xB000;
    m_fls_errorcode = _00EB6FCF();
    if (m_fls_errorcode != 0x01)
    {
    _522E:
        MCU_memory[0x2195]++;
        if (MCU_memory[0x2195] < 0x08)
        {
            goto _51E9;
        }
    }
_5238:
    m_fls_offset = 0xB000;
    m_fls_buf = 0x9000;
    do
    {
    _5247:
        if (flash_emu_read(m_fls_buf) != 0xFF)
        {
        _524D:
            m_fls_offset = m_fls_buf + 0x2000;
            m_fls_log = m_fls_offset;
            m_fls_errorcode = _00EB74C9(flash_emu_read(m_fls_buf), 0x00);
        }
    _5268:
        m_fls_buf += 0x01;
    } while (m_fls_buf != 0xA000);
}
// 00EB4275 - 00EB429A
UINT8 _00EB4275(UINT8 y)
{
    m_fls_point = 0x0B00 + MCU_memory[0x8A];
    m_fls_point <<= 4;
    while (flash_emu_read(m_fls_point + y))
    {
    _5291:
        y++;
        if (y == 0x10)
        {
            return 0x01;
        }
    }
    return 0x00;
}
// 00EB43C9 - 00EB44CA
void fun_fls_clearBufSector()
{
    // m_fls_SectorList = 0x01;m_fls_Capacity = 0x00;m_fls_BlgIndex = 0x00;
    fun_fls_init2();
    UINT8 a = m_fls_SectorList;
    goto _53E9;
_53D5:
    m_fls_Capacity++;
    if (m_fls_Capacity == FLASHCAPACITY)
    {
        return;
    }
    m_fls_SectorList += 0x07;
_53E9:
    m_fls_bank_4 = m_fls_SectorList + 0x01;
    fun_fls_SetBank4k_4();
    MCU_memory[0x2195] = 0x00;
_53FF:
    // 擦除bank4映射的4K数据
    _00EB7347();
    flash_emu_write(0x4000, 0x30); // Sector-Erase
    *(UINT16*)(MCU_memory + 0x2193) = 0x0000;
    while (flash_emu_read(0x4000) != 0xFF)
    {
    _541B:
        *(UINT16*)(MCU_memory + 0x2193) += 1;
        if (*(UINT16*)(MCU_memory + 0x2193) == 0xFF00)
        {
        _542D:
            m_fls_errorcode = 0x00;
            break;
        }
    }
    _5432:
    m_fls_log = 0x4000;
    m_fls_errorcode = _00EB6FCF();
    if (m_fls_errorcode != 0x01)
    {
    _5444:
        MCU_memory[0x2195]++;
        if (MCU_memory[0x2195] < 0x08)
        {
            goto _53FF;
        }
    }
_544E:
    fun_writeLittleSector();
    m_fls_bank_4 = (m_fls_SectorList + 0x02) & 0x00FF;
    fun_fls_SetBank4k_4();
    MCU_memory[0x2195] = 0x00;
_5467:
    // 擦除bank4映射的4K数据
    _00EB7347();
    flash_emu_write(0x4000, 0x30); // Sector-Erase
    *(UINT16*)(MCU_memory + 0x2193) = 0x0000;
    while (flash_emu_read(0x4000) != 0xFF)
    {
        _5483:
        *(UINT16*)(MCU_memory + 0x2193) += 1;
        if (*(UINT16*)(MCU_memory + 0x2193) == 0xFF00)
        {
        _5495:
            m_fls_errorcode = 0x00;
            break;
        }
    }
    _549A:
    m_fls_log = 0x4000;
    m_fls_errorcode = _00EB6FCF();
    if (m_fls_errorcode != 0x01)
    {
        _54AC:
        MCU_memory[0x2195]++;
        if (MCU_memory[0x2195] < 0x08)
        {
            goto _5467;
        }
    }
_54B6:
    m_fls_bank_4 = (m_fls_SectorList + 0x04) & 0x00FF;
    fun_fls_SetBank4k_4();
    goto _53D5;
}
// BANK映射 0x0A:m_fls_bank_A+0x0200
// 00EB44CB - 00EB44E1
void fun_fls_SetBank4k_A()
{
    PhysicalBankNumber = m_fls_bank_A + 0x0200;
    m_fun_changeDataBank(0x0A, 0x01);
}
// 00EB44E2 - 00EB44F8
void fun_fls_SetBank4k_9()
{
    PhysicalBankNumber = m_fls_bank_9 + 0x0200;
    m_fun_changeDataBank(0x09, 0x01);
}
// 00EB44FA - 00EB454A
void fun_writeLittleSector()
{
    m_fls_bank_9 = m_fls_SectorList;
    fun_fls_SetBank4k_9();
    m_fls_input = 0x9000;
    m_fls_output = 0x4000;
    do
    {
    _5518:
        UINT8 a = flash_emu_read(m_fls_input);
        if ((a == 0x02) || (a == 0x03))
        {
        _5537:
            m_fls_log = m_fls_output;
            m_fls_errorcode = _00EB74C9(flash_emu_read(m_fls_input), 0x00);
        }
    _5522:
        m_fls_input += 1;
        m_fls_output += 1;
    } while (MCU_memory[0x85] != 0xA0);
}
// 00EB46A1 - 00EB4705
void _00EB46A1()
{
    // m_fls_SectorList = 0x01;m_fls_Capacity = 0x00;m_fls_BlgIndex = 0x00;
    fun_fls_init2();
    UINT8 a = m_fls_BlgIndex;
    goto _56BE;
_56AA:
    m_fls_Capacity++;
    if (m_fls_Capacity == 0x02)
    {
        return;
    }
    a = m_fls_BlgIndex + 0x07;
    m_fls_BlgIndex = a;
_56BE:
    m_fls_bank_4 = a;
    fun_fls_SetBank4k_4();
    m_fls_bank_A = (m_fls_BlgIndex + 0x03) & 0xFF;
    fun_fls_SetBank4k_A();
    _00EB5170();
    m_fls_bank_4 = (m_fls_BlgIndex + 0x01) & 0xFF;
    fun_fls_SetBank4k_4();
    m_fls_bank_A = (m_fls_BlgIndex + 0x02) & 0xFF;
    fun_fls_SetBank4k_A();
    _00EB5170();
    goto _56AA;
}
// 00EB4706 - 00EB4794
void _00EB4706()
{
    m_fls_bank_B = MCU_memory[0x2181];
    fun_fls_SetBank4k_B();
    m_fls_offset = *(UINT16*)(MCU_memory + 0x217F);
    UINT8 y = 0x00;
    m_fls_log = m_fls_offset;
    m_fls_errorcode = _00EB74C9(m_fls_filename & 0xFF, y);
    y++;
    m_fls_log = m_fls_offset;
    m_fls_errorcode = _00EB74C9(m_fls_filename >> 8, y);
    y++;
    do
    {
    _5744:
        m_fls_log = m_fls_offset;
        m_fls_errorcode = _00EB74C9(MCU_memory[0x2100 + y], y);
        y++;
    } while (y != 0x0F);
    _575A:
    m_fls_log = m_fls_offset;
    m_fls_errorcode = _00EB74C9(m_fls_filetype, y);
    MCU_memory[0x217F] += 0x10;
    if (MCU_memory[0x217F])
    {
        return;
    }
    MCU_memory[0x2180]++;
    if (MCU_memory[0x2180] == 0xC0)
    {
    _5786:
        MCU_memory[0x2181] += 0x07;
        MCU_memory[0x2180] = 0xB0;
    }
}
// 00EB4795 - 00EB48AE
void _00EB4795()
{
    m_fls_point = *(UINT16*)(MCU_memory + 0x217C);
    *(UINT16*)(MCU_memory + 0x2153) = (*(UINT32*)(MCU_memory + 0x210C) + 0x0FFF) >> 8;
    *(UINT16*)(MCU_memory + 0x2153) >>= 4;
    m_fls_filename = m_fls_point;
    m_fls_filename <<= 4;
    _00EB4706();
    if (*(UINT16*)(MCU_memory + 0x2179) == m_fls_point)
    {
    _5800:
        *(UINT16*)(MCU_memory + 0x2179) += *(UINT16*)(MCU_memory + 0x2153);
    }
    else
    {
    _5816:
        if (*(UINT16*)(MCU_memory + 0x2153) == 0x0000)
        {
            return;
        }
    _5820:
        fun_fls_moveASector();
        fun_fls_jinDuTiao();
        *(UINT16*)(MCU_memory + 0x2179) += 1;
        MCU_memory[0x80] += 1;
        MCU_memory[0x217C] += 1;
        if (MCU_memory[0x217C] == 0x00)
        {
            _5835:
            MCU_memory[0x217D]++;
            MCU_memory[0x81] = MCU_memory[0x217D];
            MCU_memory[0x217E] += 0x07;
        }
    _5846:
        *(UINT16*)(MCU_memory + 0x2153) -= 1;
        if (*(UINT16*)(MCU_memory + 0x2153) == 0x0000)
        {
            return;
        }
        goto _5816;
    }
    _5870:
    if (*(UINT16*)(MCU_memory + 0x2153))
    {
    _587A:
        MCU_memory[0x81] = 0x90;
        m_fls_bank_9 = MCU_memory[0x217E];
        fun_fls_SetBank4k_9();
        m_fls_log = m_fls_point;
        m_fls_errorcode = _00EB74C9(0x01, 0x00);
        *(UINT16*)(MCU_memory + 0x2153) -= 1;
        MCU_memory[0x80] += 1;
        MCU_memory[0x217C] += 1;
        if (MCU_memory[0x217C] == 0x00)
        {
            MCU_memory[0x217D]++;
            MCU_memory[0x217E] += 0x07;
        }
    }
}
// 00EB48AF - 00EB4901
void fun_fls_saveVarToHandle1()
{
    UINT8 y = 0x0C;
    m_fls_Data_filehandle[y] = 0x02;
    y++;
    *(UINT16*)(m_fls_Data_filehandle + y) = m_fls_filename;
    y += 2;
    // filepoint
    do
    {
    _58C7:
        m_fls_Data_filehandle[y] = 0x00;
        y++;
    } while (y != 0x12);
    // filelength
    m_fls_Data_filehandle[y] = MCU_memory[0x210C];
    y++;
    m_fls_Data_filehandle[y] = MCU_memory[0x210D];
    y++;
    m_fls_Data_filehandle[y] = MCU_memory[0x210E];
    y++;
    // index_add
    MCU_memory[0x2170] = MCU_memory[0x2156];
    m_fls_Data_filehandle[y] = MCU_memory[0x2156];
    y++;
    MCU_memory[0x2171] = MCU_memory[0x2157];
    m_fls_Data_filehandle[y] = MCU_memory[0x2157];
    y++;
    MCU_memory[0x2172] = MCU_memory[0x2158];
    m_fls_Data_filehandle[y] = MCU_memory[0x2158];
}
// 00EB4902 - 00EB496D
void fun_fls_SupplySector()
{
    MCU_memory[0x2154] = 0x00;
    // m_fls_SectorList = 0x01;m_fls_Capacity = 0x00;m_fls_BlgIndex = 0x00;
    fun_fls_init2();
    UINT8 a = m_fls_SectorList;
    goto _5924;
_5910:
    m_fls_Capacity++;
    if (m_fls_Capacity == FLASHCAPACITY)
    {
        return;
    }
    a = m_fls_SectorList += 0x07;
    m_fls_SectorList = a;
_5924:
    m_fls_bank_4 = a;
    fun_fls_SetBank4k_4();
    UINT8 y = 0x00;
    m_fls_block = 0x4000;
    if (MCU_memory[0x2154] == 0x00)
    {
    _593E:
        if (flash_emu_read(m_fls_block) != 0x03)
        {
            MCU_memory[0x8A]++;
            if (MCU_memory[0x8A])
            {
                goto _593E;
            }
            goto _5910;
        }
    _594C:
        MCU_memory[0x2154]++;
    }
    _594F:
    if (flash_emu_read(m_fls_block) == 0xFF)
    {
    _5957:
        m_fls_log = m_fls_block;
        m_fls_errorcode = _00EB74C9(0x02, 0x00);
    }
_5967:
    MCU_memory[0x8A]++;
    if (MCU_memory[0x8A])
    {
        goto _594F;
    }
    goto _5910;
}
// 00EB4A10 - 00EB4A9A
void _00EB4A10()
{
    // m_fls_SectorList = 0x01;m_fls_Capacity = 0x00;m_fls_BlgIndex = 0x00;
    fun_fls_init2();
    UINT8 a = m_fls_SectorList;
    goto _5A2D;
_5A19:
    m_fls_Capacity++;
    if (m_fls_Capacity == FLASHCAPACITY)
    {
        return;
    }
    a = m_fls_SectorList += 0x07;
    m_fls_SectorList = a;
_5A2D:
    m_fls_bank_4 = a;
    fun_fls_SetBank4k_4();
    m_fls_block = 0x4000;
    m_fls_bank_B = (m_fls_SectorList + 0x03) & 0xFF;
    fun_fls_SetBank4k_B();
    _5A53:
    if (flash_emu_read(m_fls_block) != 0x02)
    {
        _5A59:
        MCU_memory[0x8A]++;
        if (MCU_memory[0x8A])
        {
            goto _5A53;
        }
        goto _5A19;
    }
_5A60:
    m_fls_point = 0x0B00 + MCU_memory[0x8A];
    m_fls_point <<= 4;
    UINT8 y = 0x00;
_5A7A:
    while (flash_emu_read(m_fls_point+y) != 0x02)
    {
    _5A80:
        y++;
        if (y == 0x10)
        {
        _5A85:
            m_fls_log = m_fls_block;
            m_fls_errorcode = _00EB74C9(0x00, 0x00);
            goto _5A59;
        }
    }
}
// 00EB4A9B - 00EB4AAD
void _00EB4A9B()
{
    fun_fls_getLastSector();
    m_fls_openmode = 0x01 + MCU_memory[0x2152];
    m_fls_filehandle = FLASHCAPACITY;
}
// 00EB4AAE - 00EB4AFF
UINT8 _00EB4AAE()
{
    MCU_memory[0x80]--;
    UINT8 a = m_fls_openmode;
    goto _5AC7;
_5AB6:
    m_fls_filehandle--;
    if (m_fls_filehandle == 0x00)
    {
        return 0x00;;
    }
    a = m_fls_openmode - 0x07;
    m_fls_openmode = a;
_5AC7:
    m_fls_bank_4 = a;
    fun_fls_SetBank4k_4();
    _5AD2:
    if (flash_emu_read(m_fls_point) != 0x03)
    {
        _5ADA:
        MCU_memory[0x80]--;
        if (MCU_memory[0x80] != 0xFF)
        {
            goto _5AD2;
        }
        goto _5AB6;
    }
_5AE4:
    m_fls_bank_B = ((UINT16)(m_fls_filehandle - 0x01) << 8) + MCU_memory[0x80];
    fun_fls_SetBank4k_B();
    m_fls_output = 0xB000;
    return 0x01;
}
// 00EB4B00 - 00EB4BA9
void _00EB4B00()
{
    UINT8 a;
    _00EB4A9B();
    UINT8 y = 0x00;
    m_fls_point = 0x4000;
    if (_00EB4AAE() == 0x00)
    {
        return;
    }
    _5B14:
    // m_fls_SectorList = 0x01;m_fls_Capacity = 0x00;m_fls_BlgIndex = 0x00;
    fun_fls_init2();
    a = m_fls_SectorList;
    goto _5B31;
_5B1D:
    m_fls_Capacity++;
    if (m_fls_Capacity == FLASHCAPACITY)
    {
        return;
    }
    a = m_fls_SectorList + 0x07;
    m_fls_SectorList = a;
_5B31:
    m_fls_bank_4 = a;
    fun_fls_SetBank4k_4();
    m_fls_block = 0x4000;
    _5B46:
    if (flash_emu_read(m_fls_block) != 0x03)
    {
    _5B4E:
        MCU_memory[0x8A]++;
        if (MCU_memory[0x8A])
        {
            goto _5B46;
        }
        goto _5B1D;
    }
    goto _5B7D;
_5B57:
    m_fls_bank_4 = m_fls_SectorList;
    fun_fls_SetBank4k_4();
    m_fls_log = m_fls_block;
    m_fls_errorcode = _00EB74C9(0x00, 0x00);
    MCU_memory[0x8A]++;
    if (MCU_memory[0x8A])
    {
        goto _5B46;
    }
    goto _5B1D;
_5B7D:
    m_fls_bank_A = ((UINT16)m_fls_Capacity << 8) + MCU_memory[0x8A];
    fun_fls_SetBank4k_A();
    m_fls_input = 0xA000;
    if ((MCU_memory[0x8A] != MCU_memory[0x80]) || (m_fls_Capacity + 0x01 != m_fls_filehandle))
    {
    _5BA4:
        if (_00EB4BAA() == 0x00)
        { // 进位为0分支
            goto _5B57;
        }
    }
}
// 00EB4BAA - 00EB4C03
UINT8 _00EB4BAA()
{
    UINT8 y = 0x0F;
    _5BAC:
    UINT8 a = flash_emu_read(m_fls_input + y);
    if (a == 0x00 || a == 0xFF)
    {
    _5BB4:
        m_fls_input += 0x0010;
        if (MCU_memory[0x85] == 0xB0)
        {
            return 0x00;
        }
        goto _5BAC;
    }
_5BC9:
    if (flash_emu_read(m_fls_output + 0x0F) == 0xFF)
    {
    _5BD1:
        _00EB4C04();
        goto _5BB4;
    }
    _5BD7:
    m_fls_output += 0x0010;
    if (MCU_memory[0x83] != 0xC0)
    {
        goto _5BC9;
    }
    _5BE8:
    if (_00EB4AAE() == 0x00)
    {
        return 0x00;
    }
    if ((MCU_memory[0x8A] != MCU_memory[0x80]) || (m_fls_Capacity + 0x01 != m_fls_filehandle))
    {
        goto _5BC9;
    }
    return 0x00;
}
// 00EB4C04 - 00EB4C2D
void _00EB4C04()
{
    UINT8 y = 0x00;
    do
    {
    _5C06:
        m_fls_log = m_fls_output;
        m_fls_errorcode = _00EB74C9(flash_emu_read(m_fls_input + y), y);
        y++;
    } while (y != 0x10);
    y = 0x0F;
    m_fls_log = m_fls_input;
    m_fls_errorcode = _00EB74C9(0x00, y);
}
// 00EB4C2E - 00EB4CA6
void _00EB4C2E()
{
    m_fls_offset = 0xAFF0;
    UINT8 x = 0xFF;
    _5C38:
    UINT8 y = 0x0F;
    UINT8 a = flash_emu_read(m_fls_offset + y);
    if (a == 0x00 || a == 0xFF)
    {
    _5C42:
        x--;
        m_fls_offset -= 0x0010;
        if (MCU_memory[0x87] == 0x9F)
        {
            return;
        }
        goto _5C38;
    }
_5C57:
    // m_fls_filename
    y = 0x00;
    MCU_memory[0x210F] = flash_emu_read(m_fls_offset + y);
    y++;
    MCU_memory[0x2110] = flash_emu_read(m_fls_offset + y);
    y++;
    do
    {
        _5C65:
        // m_fls_information
        MCU_memory[0x2100 + y] = flash_emu_read(m_fls_offset + y);
        y++;
    } while (y != 0x0F);
_5C6F:
    m_fls_filetype = flash_emu_read(m_fls_offset + y);
    UINT8 tmp = x;
    *(UINT16*)(MCU_memory + 0x2157) = m_fls_bank_A;
    UINT16 tmp_m_fls_bank_A = m_fls_bank_A;
    MCU_memory[0x2156] = x;
    UINT16 tmp16 = m_fls_offset;
    _00EB4D9E();
    m_fls_offset = tmp16;
    m_fls_bank_A = tmp_m_fls_bank_A;
    fun_fls_SetBank4k_A();
    x = tmp;
    goto _5C42;
}
// 00EB4CA7 - 00EB4D9D
UINT8 _00EB4CA7()
{
    MCU_memory[0x2159] = (*(UINT16*)(MCU_memory + 0x210C) + 0x00FF) >> 8;
    // m_fls_SectorList=0x07*(FLASHCAPACITY-1)+1
    fun_fls_init3();
    UINT8 a = m_fls_SectorList;
    goto _5CCF;
_5CBE:
    m_fls_Capacity--;
    if (m_fls_Capacity == 0x00)
    {
        return 0x00;
    }
_5CC6:
    a = m_fls_SectorList - 0x07;
    m_fls_SectorList = a;
_5CCF:
    m_fls_bank_4 = a;
    fun_fls_SetBank4k_4();
    UINT8 y = 0x00;
    m_fls_block = 0x40FF;
    MCU_memory[0x2155] = m_fls_SectorList + 0x03;
    m_fls_bank_B = MCU_memory[0x2155];
    fun_fls_SetBank4k_B();
_5CF8:
    a = flash_emu_read(m_fls_block + y);
    if (a == 0x02)
    {
    _5D12:
        MCU_memory[0x2152] = y;
        m_fls_point = 0x0B00 + MCU_memory[0x8A];
        m_fls_point <<= 4;
        UINT8 x = 0x00;
        while (y != 0x10)
        {
        _5D33:
            if (flash_emu_read(m_fls_point + y) == 0xFF)
            {
            _5D4B:
                x++;
                y++;
                if (x < MCU_memory[0x2159])
                {
                    continue;
                }
            _5D52:
                MCU_memory[0x8B] = m_fls_Capacity - 0x01;
                m_fls_block <<= 4;
                x = y;
                y = 0x02;
                if (MCU_memory[0x8B] < m_fls_Data_filehandle[y])
                {
                    return 0x00;
                }
            _5D74:
                // m_fls_filename
                MCU_memory[0x2110] = MCU_memory[0x8B];
                if (MCU_memory[0x2110])
                {
                _5D79:
                    MCU_memory[0x210F] = MCU_memory[0x8A] | MCU_memory[0x2152];
                    return 0x01;
                }
            _5D89:
                y = 0x01;
                if ((m_fls_Data_filehandle[y] & 0xF0) >= MCU_memory[0x8A])
                {
                    return 0x00;
                }
            _5D94:
                MCU_memory[0x210F] = MCU_memory[0x8A] | MCU_memory[0x2152];
                return 0x01;
            }
        _5D39:
            y++;
            x = 0x00;
            MCU_memory[0x2152] = y;
        }
        goto _5D05;
    }
    else if (a == 0x03)
    {
    _5D05:
        y = 0x00;
        MCU_memory[0x8A]--;
        if (MCU_memory[0x8A] != 0xFF)
        {
            goto _5CF8;
        }
        goto _5CBE;
    }
    else
    {
        return 0x00;
    }
}
// 00EB4D9E - 00EB4DC4
void _00EB4D9E()
{
    fun_fls_saveVarToHandle0();
    if (_00EB4CA7() && fun_flash_check_index_room())
    {
    _5DAF:
        _00EB62FD();
        _00EB6082();
        fun_fls_saveVarToHandle1();
        _00EB4DC5();
        set_valubable_point();
        FileDel(0x00);
    }
    //return 0x01;
}
// 提取自FileRead
UINT8 _00EB5D04(UINT8 a)
{
    UINT8 y = fun_fls_mul12(a);
    m_fls_errorcode = 0x01;
    if (m_fls_datalength)
    {
    _6D11:
        if (MCU_memory[0x2122 + y])
        {
        _6D16:
            y += 3;
            // m_fls_filepoint
            MCU_memory[0x2113] = MCU_memory[0x2122 + y];
            y++;
            MCU_memory[0x2114] = MCU_memory[0x2122 + y];
            y++;
            MCU_memory[0x2115] = MCU_memory[0x2122 + y];
            get_add(y);
            y = 0x00;
            do
            {
                MCU_memory[m_fls_input] = flash_emu_read(m_fls_output);
                m_fls_datalength--;
                m_fls_input += 1;
                m_fls_output += 1;
            _6D45:
                if (MCU_memory[0x83] == 0x50)
                {
                _6D4B:
                    m_fls_bank_4 += 0x0001;
                    // BANK映射 0x04:m_fls_bank_4+0x0200
                    fun_fls_SetBank4k_4();
                    m_fls_output = 0x4000;
                }
            } while (m_fls_datalength);
        }
        else
        {
        _6D66:
            m_fls_errorcode = 0x00;
        }
    }
_6D6B:
    // 恢复0x09,0x0A,0x0B,0x0C,0x04的bank映射
    _00EB54B2();
    return m_fls_errorcode;
}
// 提取自FileWrite
UINT8 _00EB5E60(UINT8 a)
{
    UINT8 y = fun_fls_mul12(a);
    m_fls_errorcode = 0x01;
    if (m_fls_datalength)
    {
    _6E6D:
        if (MCU_memory[0x2122 + y] == 0x02)
        {
            y += 3;
            // m_fls_filepoint
            MCU_memory[0x2113] = MCU_memory[0x2122 + y];
            y++;
            MCU_memory[0x2114] = MCU_memory[0x2122 + y];
            y++;
            MCU_memory[0x2115] = MCU_memory[0x2122 + y];
            get_add(y);
            y = 0x00;
        _6E90:
            m_fls_log = m_fls_output;
            m_fls_errorcode = _00EB74C9(flash_emu_read(m_fls_input + y), y);
            m_fls_datalength--;
            m_fls_input += 1;
            m_fls_output += 1;
            if (MCU_memory[0x83] == 0x50)
            {
            _6EB5:
                m_fls_bank_4 += 1;
                fun_fls_SetBank4k_4();
                m_fls_output = 0x4000;
            }
        _6EC8:
            if (m_fls_datalength == 0x00)
            {
                goto _6ED5;
            }
            goto _6E90;
        }
        else
        {
        _6ED0:
            m_fls_errorcode = 0x00;
        }
    }
_6ED5:
    _00EB54B2();
    return m_fls_errorcode;
}
// 00EB4DC5 - 00EB4E34
void _00EB4DC5()
{
    MCU_memory[0x2159] = (*(UINT16*)(MCU_memory + 0x210C) + 0x00FF) >> 8;
    do
    {
    _5DD3:
        UINT8 tmp = MCU_memory[0x2159];
        m_fls_input = 0x2400;
        m_fls_datalength = 0x80;
        m_fls_resume++;
        _00EB5D04(0x00);
        m_fls_datalength = 0x80;
        m_fls_input = 0x2400;
        m_fls_resume++;
        _00EB5E60(0x01);
        m_fls_datalength = 0x80;
        m_fls_input = 0x2400;
        m_fls_resume++;
        _00EB5D04(0x00);
        m_fls_datalength = 0x80;
        m_fls_input = 0x2400;
        m_fls_resume++;
        _00EB5E60(0x01);
        MCU_memory[0x2159] = tmp - 0x01;
    } while (MCU_memory[0x2159]);
}
// 00EB4E35 - 00EB4E86
void fun_fls_saveVarToHandle0()
{
    m_fls_Data_filehandle[0] = 0x02;
    UINT8 y = 0x01;
    *(UINT16*)(m_fls_Data_filehandle + y) = m_fls_filename;
    y += 2;
    // filepoint = 0x000000
    do
    {
        m_fls_Data_filehandle[y] = 0x00;
        y++;
    } while (y != 0x06);
    // filelength
    m_fls_Data_filehandle[y] = MCU_memory[0x210C];
    y++;
    m_fls_Data_filehandle[y] = MCU_memory[0x210D];
    y++;
    m_fls_Data_filehandle[y] = MCU_memory[0x210E];
    y++;
    // index_add
    MCU_memory[0x2170] = MCU_memory[0x2156];
    m_fls_Data_filehandle[y] = MCU_memory[0x2156];
    y++;
    MCU_memory[0x2171] = MCU_memory[0x2157];
    m_fls_Data_filehandle[y] = MCU_memory[0x2157];
    y++;
    MCU_memory[0x2172] = MCU_memory[0x2158];
    m_fls_Data_filehandle[y] = MCU_memory[0x2158];
}
// 00EB4E87 - 00EB4EB1
void Return_Para_FileCreat(U16* filename, U8* filehandle)
{
    *filename = m_fls_filename;
    *filehandle = m_fls_filehandle;
}
// 00EB4EB2 - 00EB4FD7
void fun_fls_moveASector()
{
    MCU_memory[0x81] = MCU_memory[0x217D];
    m_fls_bank_A = m_fls_point;
    fun_fls_SetBank4k_A();
    MCU_memory[0x2195] = 0x00;
    _5EC9:
    // 擦除bankA映射的4K数据
    _00EB7347();
    flash_emu_write(0xA000, 0x30); // Sector-Erase
    *(UINT16*)(MCU_memory + 0x2193) = 0x0000;
    while (flash_emu_read(0xA000) != 0xFF)
    {
    _5EE5:
        *(UINT16*)(MCU_memory + 0x2193) += 1;
        if (*(UINT16*)(MCU_memory + 0x2193) >= 0xFF00)
        {
        _5EF7:
            m_fls_errorcode = 0x00;
            break;
        }
    }
_5EFC:
    m_fls_log = 0xA000;
    m_fls_errorcode = _00EB6FCF();
    if (m_fls_errorcode != 0x01)
    {
    _5F0E:
        MCU_memory[0x2195]++;
        if (MCU_memory[0x2195] < 0x08)
        {
            goto _5EC9;
        }
    }
_5F18:
    m_fls_bank_B = *(UINT16*)(MCU_memory + 0x2179) & 0x0FFF;
    fun_fls_SetBank4k_B();
    m_fls_input = 0xB000;
    UINT8 y = 0x00;
    while (MCU_memory[0x85] != 0xC0)
    {
    _5F39:
        m_fls_output = m_fls_input - 0x1000;
        if (flash_emu_read(m_fls_input + y) != 0xFF)
        {
        _5F48:
            m_fls_log = m_fls_output;
            m_fls_errorcode = _00EB74C9(flash_emu_read(m_fls_input + y), y);
        }
    _5F58:
        m_fls_input += 1;
    }
    _5F61:
    MCU_memory[0x2195] = 0x00;
    _5F66:
    // 擦除bankB映射的4K数据
    _00EB7347();
    flash_emu_write(0xB000, 0x30); // Sector-Erase
    *(UINT16*)(MCU_memory + 0x2193) = 0x0000;
    while (flash_emu_read(0xB000) != 0xFF)
    {
        _5F82:
        *(UINT16*)(MCU_memory + 0x2193) += 1;
        if (*(UINT16*)(MCU_memory + 0x2193) >= 0xFF00)
        {
        _5F94:
            m_fls_errorcode = 0x00;
            break;
        }
    }
    _5F99:
    m_fls_log = 0xB000;
    m_fls_errorcode = _00EB6FCF();
    if (m_fls_errorcode != 0x01)
    {
    _5FAB:
        MCU_memory[0x2195]++;
        if (MCU_memory[0x2195] < 0x08)
        {
            goto _5F66;
        }
    }
_5FB5:
    MCU_memory[0x81] = 0x90;
    m_fls_bank_9 = MCU_memory[0x217E];
    fun_fls_SetBank4k_9();
    m_fls_log = m_fls_point;
    m_fls_errorcode = _00EB74C9(0x01, y);
}
// 00EB4FD8 - 00EB5005
void fun_fls_jinDuTiao()
{
    _00F2E329(*(UINT16*)(MCU_memory + 0x2179));
}
// 00EB5006 - 00EB501D
void fun_DelUnuseSector()
{
    MCU_memory[0x8A] = MCU_memory[0x2179];
    m_fls_log = m_fls_block;
    m_fls_errorcode = _00EB74C9(0x00, 0x00);
}
// 00EB501F - 00EB504C
void Load_Para_FileCreat(U8 filetype, U32 filelength, U8* information)
{
    m_fls_filetype = filetype;
    // m_fls_filelength
    MCU_memory[0x210C] = filelength;
    MCU_memory[0x210D] = filelength>>8;
    MCU_memory[0x210E] = filelength>>16;
    for (UINT8 y = 0x00; y != 0x0A; y++)
    {
        m_fls_information[y] = information[y];
    }
}
// 00EB504D - 00EB50AF
// 备份0x09,0x0A,0x0B,0x0C,0x04的BANK映射
void fun_fls_savebank()
{
    m_fls_resume += 1;
    if (m_fls_resume == 0x01)
    {
        m_fls_PhysicalBank0 = MCU_bankaddresslist[0x09];
        m_fls_PhysicalBank1 = MCU_bankaddresslist[0x0A];
        m_fls_PhysicalBank2 = MCU_bankaddresslist[0x0B];
        m_fls_PhysicalBank3 = MCU_bankaddresslist[0x0C];
        m_fls_PhysicalBank4 = MCU_bankaddresslist[0x04];
    }
}
// 00EB50B0 - 00EB50D7
// BANK映射 0x09:0x0202, 0x0A:0x0203, 0x0B:0x0204, 0x0C:0x0205
// BANK映射 0x04:0x0200
void fun_fls_SetBank16k()
{
    if (m_fls_resume == 0x01)
    {
        PhysicalBankNumber = 0x0202;
        // BANK映射 0x09:0x0202, 0x0A:0x0203, 0x0B:0x0204, 0x0C:0x0205
        m_fun_changeDataBank(0x09, 0x04);
        PhysicalBankNumber = 0x0200;
        // BANK映射 0x04:0x0200
        m_fun_changeDataBank(0x04, 0x01);
    }
}
// 00EB50DC - 00EB50DF
void fun_fls_delay_point()
{
    fun_fls_delay();
}
// 00EB50E0 - 00EB50E3
void fun_fls_delay_input()
{
    fun_fls_delay();
}
// 00EB50E4 - 00EB50E7
void fun_fls_delay_offset()
{
    fun_fls_delay();
}
// 00EB50E8 - 00EB50EB
void fun_fls_delay_output()
{
    fun_fls_delay();
}
// 00EB50EC - 00EB50EF
// 等待Flash操作完成
void fun_fls_delay_buf()
{
    fun_fls_delay();
}
// 00EB50F0 - 00EB5106
// BANK映射 0x0B:m_fls_bank_B+0x0200
void fun_fls_SetBank4k_B()
{
    PhysicalBankNumber = m_fls_bank_B + 0x0200;
    m_fun_changeDataBank(0x0B, 0x01);
}
// 00EB510A - 00EB5142
// BANK映射
void m_fun_changeDataBank(UINT8 a, UINT8 x)
{
    for (UINT8 i = 0; i < x; i++)
    {
        MCU_bankaddresslist[a + i] = PhysicalBankNumber + i;
    }
}
// 00EB5143 - 00EB5150
// m_fls_SectorList = 0x01;m_fls_Capacity = 0x00;m_fls_BlgIndex = 0x00;
void fun_fls_init2()
{
    m_fls_SectorList = 0x01;
    m_fls_Capacity = 0x00;
    m_fls_BlgIndex = 0x00;
}
// 00EB5151 - 00EB5167
// BANK映射 0x04:m_fls_bank_4+0x0200
void fun_fls_SetBank4k_4()
{
    PhysicalBankNumber = m_fls_bank_4 + 0x0200;
    // BANK映射 0x04:m_fls_bank_4
    m_fun_changeDataBank(0x04, 0x01);
}
// 00EB5168 - 
void _00EB5168()
{
    fun_fls_delay();
}
// 00EB516C - 
void _00EB516C()
{
    fun_fls_delay();
}
// 00EB5170 - 00EB51FC
void _00EB5170()
{
    MCU_memory[0x2195] = 0x00;
    _6175:
    // 擦除bank4映射的4K数据
    _00EB7347();
    flash_emu_write(0x4000, 0x30); // Sector-Erase
    *(UINT16*)(MCU_memory + 0x2193) = 0x0000;
    while (flash_emu_read(0x4000) != 0xFF)
    {
        _6191:
        *(UINT16*)(MCU_memory + 0x2193) += 1;
        if (*(UINT16*)(MCU_memory + 0x2193) >= 0xFF00)
        {
            m_fls_errorcode = 0x00;
            break;
        }
    }
    _61A8:
    m_fls_log = 0x4000;
    m_fls_errorcode = _00EB6FCF();
    if (m_fls_errorcode != 0x01)
    {
        _61BA:
        MCU_memory[0x2195]++;
        if (MCU_memory[0x2195] < 0x08)
        {
            goto _6175;
        }
    }
    _61C4:
    UINT8 y = 0x00;
    m_fls_output = 0x4000;
    m_fls_input = 0xA000;
    _61D4:
    while (flash_emu_read(m_fls_input + y) != 0xFF)
    {
        _61DA:
        m_fls_log = m_fls_output;
        m_fls_errorcode = _00EB74C9(flash_emu_read(m_fls_input + y), y);
    }
    _61EA:
    m_fls_output += 1;
    m_fls_input += 1;
    if (MCU_memory[0x83] != 0x50)
    {
        goto _61D4;
    }
}
// 00EB51FD - 00EB5282
void _00EB51FD()
{
    MCU_memory[0x2195] = 0x00;
    _6202:
    // 擦除bank4映射的4K数据
    _00EB7347();
    flash_emu_write(0x4000, 0x30); // Sector-Erase
    *(UINT16*)(MCU_memory + 0x2193) = 0x0000;
    while (flash_emu_read(0x4000) != 0xFF)
    {
        *(UINT16*)(MCU_memory + 0x2193) += 1;
        if (*(UINT16*)(MCU_memory + 0x2193) >= 0xFF00)
        {
            m_fls_errorcode = 0x00;
            break;
        }
    }
_6235:
    m_fls_log = 0x4000;
    m_fls_errorcode = _00EB6FCF();
    if (m_fls_errorcode != 0x01)
    {
        MCU_memory[0x2195]++;
        if (MCU_memory[0x2195] < 0x08)
        {
            goto _6202;
        }
    }
_6251:
    m_fls_output = 0x4000;
    m_fls_buf = 0x9000;
    do
    {
        _6260:
        m_fls_log = m_fls_output;
        m_fls_errorcode = _00EB74C9(flash_emu_read(m_fls_buf), 0x00);
        m_fls_output += 1;
        m_fls_buf += 1;
    } while (MCU_memory[0x83] != 0x50);
}
// 00EB5283 - 00EB52B7
// 判断剩余存储空间是否足够
UINT8 _00EB5283()
{
    //                                      (m_fls_filelength>>8)
    UINT8 tmp = (m_fls_filename + *(UINT16*)(MCU_memory + 0x210D)) >> 8;
    if ((tmp & 0x0F) < 0x0F)
    {
        return 0;
    }
_6296:
    if ((m_fls_filename&0xFF) + MCU_memory[0x210D] < 0xB0)
    {
        return 0;
    }
    tmp = (m_fls_filename + *(UINT16*)(MCU_memory + 0x210D)) >> 8;
    tmp += 0x0A;
    tmp >>= 4;
    if (tmp < FLASHCAPACITY)
    {
        return 0;
    }
    else
    {
        return 1;
    }
}
// 00EB52B8 - 00EB5305
UINT8 _00EB52B8()
{
    // m_fls_SectorList = 0x01;m_fls_Capacity = 0x00;m_fls_BlgIndex = 0x00;
    fun_fls_init2();
    UINT8 a = m_fls_BlgIndex;
    goto _62D5;
_62C1:
    m_fls_Capacity++;
    if (m_fls_Capacity == FLASHCAPACITY)
    {
        return 0;
    }
_62CC:
    a = m_fls_BlgIndex + 0x07;
    m_fls_BlgIndex = a;
_62D5:
    m_fls_bank_A = a;
    fun_fls_SetBank4k_A();
    m_fls_offset = 0xA000;
    while (flash_emu_read(m_fls_offset + 0x0F) != 0xFF)
    {
    _62F0:
        m_fls_offset += 0x0010;
        if (MCU_memory[0x87] == 0xB0)
        {
            goto _62C1;
        }
    }
    return 0x01;
}
// 00EB5306 - 00EB5420
void _00EB5306()
{
    MCU_memory[0x2195] = 0x00;
    _630B:
    // 擦除bank9映射的4K数据
    _00EB7347();
    flash_emu_write(0x9000, 0x30); // Sector-Erase
    *(UINT16*)(MCU_memory + 0x2193) = 0x0000;
    while (flash_emu_read(0x9000) != 0xFF)
    {
    _6327:
        MCU_memory[0x2193]++;
        if (MCU_memory[0x2193] == 0x00)
        {
            MCU_memory[0x2194]++;
            if (MCU_memory[0x2194] >= 0xFF)
            {
            _6339:
                m_fls_errorcode = 0x00;
                break;
            }
        }
    }
    _633E:
    m_fls_log = 0x9000;
    m_fls_errorcode = _00EB6FCF();
    if (m_fls_errorcode != 0x01)
    {
    _6350:
        MCU_memory[0x2195]++;
        if (MCU_memory[0x2195] < 0x08)
        {
            goto _630B;
        }
    }
_635A:
    // m_fls_SectorList = 0x01;m_fls_Capacity = 0x00;m_fls_BlgIndex = 0x00;
    fun_fls_init2();
    UINT8 a = m_fls_BlgIndex;
    goto _63CE;
_6366:
    m_fls_Capacity++;
    if (m_fls_Capacity == FLASHCAPACITY)
    {
    _6420:
        return;
    }
    _6371:
    MCU_memory[0x2195] = 0x00;
    _6376:
    // 擦除bank9映射的4K数据
    _00EB7347();
    flash_emu_write(0x9000, 0x30); // Sector-Erase
    *(UINT16*)(MCU_memory + 0x2193) = 0x0000;
    while (flash_emu_read(0x9000) != 0xFF)
    {
        _6392:
        MCU_memory[0x2193]++;
        if (MCU_memory[0x2193] == 0x00)
        {
            MCU_memory[0x2194]++;
            if (MCU_memory[0x2194] >= 0xFF)
            {
            _63A4:
                m_fls_errorcode = 0x00;
                break;
            }
        }
    }
    _63A9:
    m_fls_log = 0x9000;
    m_fls_errorcode = _00EB6FCF();
    if (m_fls_errorcode != 0x01)
    {
        _63BB:
        MCU_memory[0x2195]++;
        if (MCU_memory[0x2195] < 0x08)
        {
            goto _6376;
        }
    }
    _63C5:
    a = m_fls_BlgIndex + 0x07;
    m_fls_BlgIndex = a;
_63CE:
    m_fls_bank_A = a;
    fun_fls_SetBank4k_A();
    m_fls_offset = 0xA000;
    _63E1:
    while (flash_emu_read(m_fls_offset + 0x0F))
    {
    _63E7:
        MCU_memory[0x88] = MCU_memory[0x86];
        MCU_memory[0x89] = MCU_memory[0x87]-0x10;
        UINT8 y = 0x00;
        do
        {
            _63F4:
            m_fls_log = m_fls_buf;
            m_fls_errorcode = _00EB74C9(flash_emu_read(m_fls_offset + y), y);
            y++;
        } while (y != 0x10);
    }
_6409:
    m_fls_offset += 0x0010;
    if (MCU_memory[0x87] != 0xB0)
    {
        goto _63E1;
    }
    _00EB5421();
    goto _6366;
}
// 00EB5421 - 00EB54B1
void _00EB5421()
{
    MCU_memory[0x2195] = 0x00;
_6426:
    // 擦除bankA映射的4K数据
    _00EB7347();
    flash_emu_write(0xA000, 0x30); // Sector-Erase
    *(UINT16*)(MCU_memory + 0x2193) = 0x0000;
    while (flash_emu_read(0xA000) != 0xFF)
    {
        _6442:
        MCU_memory[0x2193]++;
        if (MCU_memory[0x2193] == 0x00)
        {
            MCU_memory[0x2194]++;
            if (MCU_memory[0x2194] >= 0xFF)
            {
            _6454:
                m_fls_errorcode = 0x00;
                break;
            }
        }
    }
    _6459:
    m_fls_log = 0xA000;
    m_fls_errorcode = _00EB6FCF();
    if (m_fls_errorcode != 0x01)
    {
    _6350:
        MCU_memory[0x2195]++;
        if (MCU_memory[0x2195] < 0x08)
        {
            goto _6426;
        }
    }
    _6475:
    m_fls_offset = 0xA000;
    m_fls_buf = 0x9000;
    _6484:
    if (flash_emu_read(m_fls_buf) != 0xFF)
    {
    _648A:
        m_fls_offset = m_fls_buf + 0x1000;
        m_fls_log = m_fls_offset;
        m_fls_errorcode = _00EB74C9(flash_emu_read(m_fls_buf), 0x00);
    }
    _64A5:
    m_fls_buf += 1;
    if (MCU_memory[0x89] != 0xA0)
    {
        goto _6484;
    }
}
// 00EB54B2 - 00EB5516
// 恢复0x09,0x0A,0x0B,0x0C,0x04的bank映射
void _00EB54B2()
{
    m_fls_resume -= 1;
    if (m_fls_resume == 0x00)
    {
        PhysicalBankNumber = m_fls_PhysicalBank0;
        m_fun_changeDataBank(0x09, 0x01);
        PhysicalBankNumber = m_fls_PhysicalBank1;
        m_fun_changeDataBank(0x0A, 0x01);
        PhysicalBankNumber = m_fls_PhysicalBank2;
        m_fun_changeDataBank(0x0B, 0x01);
        PhysicalBankNumber = m_fls_PhysicalBank3;
        m_fun_changeDataBank(0x0C, 0x01);
        PhysicalBankNumber = m_fls_PhysicalBank4;
        m_fun_changeDataBank(0x04, 0x01);
    }
}
// 00EB551B - 00EB5579
void load_para_Backup(U8 dataLength, U8* dataBuf, U32* FlashAdr)
{
    m_fls_datalength = dataLength;
    m_fls_output = dataBuf - MCU_memory;
    m_fls_point = (UINT8*)FlashAdr - MCU_memory;
    MCU_memory[0x2153] = flash_emu_read(m_fls_point+1);
    MCU_memory[0x2154] = flash_emu_read(m_fls_point+2);
    *(UINT16*)(MCU_memory + 0x2153) >>= 4;
    m_fls_bank_4 = *(UINT16*)(MCU_memory + 0x2153) - 0x0200;
    fun_fls_SetBank4k_4();
    MCU_memory[0x84] = flash_emu_read(m_fls_point);
    MCU_memory[0x85] = (flash_emu_read(m_fls_point+1) & 0x0F) | 0x04;
}
// 00EB557A - 00EB5588
void load_para_FindFirst(UINT8 fileType, PtrDictFileFindBlk pFindBlk)
{
    m_fls_filetype = fileType;
    m_fls_input = (UINT8*)pFindBlk - MCU_memory;
}
// 00EB5589 - 00EB55C0
void fun_fls_putInf()
{
    m_fls_filename = flash_emu_read(m_fls_input) + (flash_emu_read(m_fls_input + 1) << 8);
    MCU_memory[0x2168] = flash_emu_read(m_fls_input + 2);
    m_fls_Capacity = flash_emu_read(m_fls_input + 3);
    m_fls_offset = flash_emu_read(m_fls_input + 4) + (flash_emu_read(m_fls_input + 5) << 8);
    m_fls_offset += 0x0010;
    m_fls_filetype = flash_emu_read(m_fls_input + 0x26);
}
// 00EB57B4 - 00EB5801
UINT8 fun_fls_SearchNext_g()
{
    fun_fls_SetBank4k_A();
    UINT8 y = 0x0F;
    goto _67E5;
_67BC:
    m_fls_Capacity++;
    if (m_fls_Capacity == FLASHCAPACITY)
    {
        return 0x00;
    }
_67C7:
    m_fls_BlgIndex += 0x07;
    m_fls_bank_A = m_fls_BlgIndex;
    fun_fls_SetBank4k_A();
    m_fls_offset = 0xA000;
    y = 0x0F;
_67E5:
    while (flash_emu_read(m_fls_offset + y) != m_fls_filetype)
    {
    _67EC:
        m_fls_offset += 0x0010;
        if (MCU_memory[0x87] == 0xB0)
        {
            goto _67BC;
        }
    }
    return 0x01;
}
// 00EB5836 - 00EB58A6
void fun_fls_getInf()
{
    m_fls_filename = flash_emu_read(m_fls_offset) + (flash_emu_read(m_fls_offset + 1) << 8);
    flash_emu_write(m_fls_input, m_fls_filename);
    flash_emu_write(m_fls_input + 1, m_fls_filename>>8);
    flash_emu_write(m_fls_input + 2, m_fls_bank_A);
    flash_emu_write(m_fls_input + 3, m_fls_Capacity);
    flash_emu_write(m_fls_input + 4, MCU_memory[0x86]);
    flash_emu_write(m_fls_input + 5, MCU_memory[0x87]);
    m_fls_bank_4 = m_fls_filename;
    m_fls_output = ((m_fls_filename & 0x0F) | 0x40) << 8;
    m_fls_bank_4 >>= 4;
    fun_fls_SetBank4k_4();
    UINT8 y = 0x06;
    do
    {
        _6890:
        flash_emu_write(m_fls_input + y, flash_emu_read(m_fls_output + y));
        y++;
    } while (y != 0x26);
_6899:
    flash_emu_write(m_fls_input + y, m_fls_filetype);
    flash_emu_write(m_fls_input + 0x27, flash_emu_read(m_fls_output + 0x36));
}
// 00EB5927 - 00EB593B
UINT8 set_valubable_point()
{
    m_fls_log = m_fls_offset;
    m_fls_errorcode = _00EB74C9(flash_emu_read(m_fls_offset + 0x0F) & 0x7F, 0x0F);
    return m_fls_errorcode;
}
// 00EB593C - 00EB59B1
void fun_fls_write_sector_big()
{
    m_fls_SectorList = m_fls_FirstSector;
    m_fls_bank_4 = m_fls_FirstSector;
    fun_fls_SetBank4k_4();
    m_fls_FreeSector = 0x0000;
    MCU_memory[0x81] = 0x40;
    for (;;)
    {
        _695B:
        m_fls_log = m_fls_point;
        m_fls_errorcode = _00EB74C9(0x01, 0x00);
        m_fls_FreeSector += 0x0001;
        if (m_fls_FreeSector == m_fls_databag_num)
        {
            return;
        }
    _698C:
        MCU_memory[0x80]++;
        if (MCU_memory[0x80])
        {
            continue;
        }
    _6990:
        m_fls_SectorList += 0x07;
        m_fls_bank_4 = m_fls_SectorList;
        fun_fls_SetBank4k_4();
        m_fls_point = 0x4000;
    }
}
// 00EB59B2 - 00EB5A66
UINT8 fun_fls_check_index_l()
{
    // m_fls_SectorList=0x07*(FLASHCAPACITY-1)+1
    fun_fls_init3();
    UINT8 a = m_fls_SectorList;
    goto _69CC;
_69BB:
    m_fls_Capacity--;
    if (m_fls_Capacity == 0x00)
    {
        return 0x00;
    }
    m_fls_SectorList -= 0x07;
    _69CC:
    m_fls_bank_4 = a;
    // BANK映射 0x04:0x0200+a
    fun_fls_SetBank4k_4();
    m_fls_block = 0x40FF;
    _69E1:
    a = flash_emu_read(m_fls_block);
    if (a == 0x03)
    {
    _69FC:
        m_fls_bank_A = ((m_fls_Capacity - 0x01)<<8) + MCU_memory[0x8A];
        // BANK映射 0x0A:m_fls_bank_A+0x0200
        fun_fls_SetBank4k_A();
        m_fls_offset = 0xA000;
        UINT8 x = 0x00;
        do
        {
            _6A17:
            while (flash_emu_read(m_fls_offset) + (flash_emu_read(m_fls_offset + 1) << 8) == m_fls_filename)
            {
            _6A3D:
                if (flash_emu_read(m_fls_offset + 0x0F) == 0x00)
                {
                    break;
                }
            _6A43:
                MCU_memory[0x210C] = flash_emu_read(m_fls_offset + 0x0C);
                MCU_memory[0x210D] = flash_emu_read(m_fls_offset + 0x0D);
                MCU_memory[0x210E] = flash_emu_read(m_fls_offset + 0x0E);
                *(UINT16*)(MCU_memory + 0x2157) = m_fls_bank_A;
                MCU_memory[0x2156] = x;
                return 0x01;
            }
        _6A28:
            x++;
            m_fls_offset += 0x0010;
        } while (MCU_memory[0x87] != 0xB0);
        goto _69EB;
    }
    else if (a == 0x02)
    {
    _69EB:
        MCU_memory[0x8A]--;
        a = MCU_memory[0x8A];
        if (a == 0xFF)
        {
            goto _69BB;
        }
        else
        {
            goto _69E1;
        }
    }
    else
    {
    _69F8:
        return 0x00;
    }
}
// 00EB5A67 - 00EB5AED
UINT8 fun_fls_check_index_g()
{
    // m_fls_SectorList = 0x01;m_fls_Capacity = 0x00;m_fls_BlgIndex = 0x00;
    fun_fls_init2();
    UINT8 a = m_fls_BlgIndex;
    goto _6A84;
_6A70:
    m_fls_Capacity++;
    a = m_fls_Capacity;
    if (a == FLASHCAPACITY)
    {
        return 0x00;
    }
    m_fls_BlgIndex += 0x07;
    a = m_fls_BlgIndex;
_6A84:
    m_fls_bank_A = a;
    fun_fls_SetBank4k_A();
    m_fls_offset = 0xA000;
    UINT8 x = 0x00;
    do
    {
        UINT8 y = 0x00;
        if (flash_emu_read(m_fls_offset + y) == 0xF0)
        {
        _6AA2:
            y++;
            if (flash_emu_read(m_fls_offset + y) == MCU_memory[0x2110])
            {
                if (flash_emu_read(m_fls_offset + 0x0F) >= 0x20)
                {
                _6ACB:
                    MCU_memory[0x210C] = flash_emu_read(m_fls_offset + 0x0C);
                    MCU_memory[0x210D] = flash_emu_read(m_fls_offset + 0x0D);
                    MCU_memory[0x210E] = flash_emu_read(m_fls_offset + 0x0E);
                    *(UINT16*)(MCU_memory + 0x2157) = m_fls_BlgIndex;
                    MCU_memory[0x2156] = x;
                    return 0x01;
                }
            }
        }
    _6AAA:
        m_fls_offset += 0x0010;
        x++;
    } while (x);
    goto _6A70;
}
// 00EB5AEE - 00EB5AF8
// 产生y=a*12
UINT8 fun_fls_mul12(UINT8 a) // todo:调用这个函数的地方，需要用y接收返回值
{
    MCU_memory[0x2152] = a << 2;
    return MCU_memory[0x2152] * 3;
}
// 00EB5AF9 - 00EB5B17
void fun_fls_get_filehandle()
{
    UINT8 x = 0x00;
    for (;;)
    {
        _6AFB:
        UINT8 y = fun_fls_mul12(x); // y = x*12
        if (MCU_memory[0x2122 + y])
        {
            _6B04:
            x++;
            if (x == 0x04)
            {
                _6B09:
                m_fls_errorcode = 0x00;
                break;
            }
        }
        else
        {
        _6B11:
            fun_fls_write_handle(y);
            break;
        }
    }
    m_fls_filehandle = x;
}
// 00EB5B18 - 00EB5B64
void fun_fls_write_handle(UINT8 y)
{
    MCU_memory[0x2122 + y] = m_fls_openmode;
    y++;
    // m_fls_filename
    MCU_memory[0x2122 + y] = MCU_memory[0x210F];
    y++;
    MCU_memory[0x2122 + y] = MCU_memory[0x2110];
    y++;
    //
    MCU_memory[0x2122 + y] = 0x00;
    y++;
    MCU_memory[0x2122 + y] = 0x00;
    y++;
    MCU_memory[0x2122 + y] = 0x00;
    y++;
    // m_fls_filelength
    MCU_memory[0x2122 + y] = MCU_memory[0x210C];
    y++;
    MCU_memory[0x2122 + y] = MCU_memory[0x210D];
    y++;
    MCU_memory[0x2122 + y] = MCU_memory[0x210E];
    y++;
    // m_fls_index_add Flash偏移量，单位【0x10字节】
    MCU_memory[0x2122 + y] = MCU_memory[0x2156];
    y++;
    MCU_memory[0x2122 + y] = MCU_memory[0x2157];
    y++;
    MCU_memory[0x2122 + y] = MCU_memory[0x2158];
}
// 00EB5B65 - 00EB5C1B
UINT8 fun_flash_check_index_room()
{
    // m_fls_SectorList=0x07*(FLASHCAPACITY-1)+1
    fun_fls_init3();
    UINT8 a = m_fls_SectorList;
    goto _6B7F;
_6B6E:
    m_fls_Capacity--;
    if (m_fls_Capacity == 0x00)
    {
        return 0x00;
    }
    a = m_fls_SectorList - 0x07;
    m_fls_SectorList = a;
_6B7F:
    m_fls_bank_4 = a;
    fun_fls_SetBank4k_4();
    m_fls_block = 0x40FF;
_6B94:
    a = flash_emu_read(m_fls_block);
    if (a == 0x03)
    {
    _6BE3:
        m_fls_bank_A = ((m_fls_Capacity - 0x01) << 8) + MCU_memory[0x8A];
        fun_fls_SetBank4k_A();
        m_fls_offset = 0xA000;
        while (flash_emu_read(m_fls_offset + 0x0F) != 0xFF)
        {
            _6C08:
            m_fls_offset += 0x0010;
            if (MCU_memory[0x87] == 0xB0)
            {
                goto _6BA7;
            }
        }
        return 0x01;
    }
    else if (a == 0x02)
    {
    _6BA7:
        MCU_memory[0x8A]--;
        if (MCU_memory[0x8A]  == 0xFF)
        {
            goto _6B6E;
        }
        goto _6B94;
    }
    else if (a == 0xFF)
    {
    _6BB2:
        m_fls_log = m_fls_block;
        m_fls_errorcode = _00EB74C9(0x03, 0x00);
        m_fls_bank_A = ((m_fls_Capacity - 0x01) << 8) + MCU_memory[0x8A];
        fun_fls_SetBank4k_A();
        m_fls_offset = 0xA000;
        return 0x01;
    }
    return 0x00;
}
// 00EB5C1C - 00EB5C2E
// m_fls_SectorList=0x07*(FLASHCAPACITY-1)+1
void fun_fls_init3()
{
    fun_fls_getLastSector();
    m_fls_SectorList = MCU_memory[0x2152] + 0x01;
    m_fls_Capacity = FLASHCAPACITY;
}
// 00EB5C2F - 00EB5C48
// MCU_memory[0x2152]=0x07*(FLASHCAPACITY-1)
void fun_fls_getLastSector()
{
    MCU_memory[0x2152] = 0x00;
    for (UINT8 x = 0x01; x != FLASHCAPACITY; x++)
    {
        MCU_memory[0x2152] += 0x07;
    }
}
// 00EB5C49 - 00EB5C68
void fun_fls_delay()
{
    UINT8 x = 0;
    // Flash写数据忙则等待
    while (flash_emu_read(0x9000) ^ 0x20)
    {
        x++;
        if (x == 0x00)
        {
            break;
        }
    }
    x = 0;
    // 某寄存器，每次读的值不同时则进循环
    while (flash_emu_read(0xA000) ^ flash_emu_read(0xA000))
    {
        x++;
        if (x == 0x00)
        {
            m_fls_errorcode = 0x00;
            break;
        }
    }
}
// 00EB5C69 - 00EB5C82
void fun_fls_load_para_fileopen(U16 filename, U8 filetype, U8 openmode, U8* filehandle, U32* filelength)
{
    m_fls_filename = filename;
    m_fls_filetype = filetype;
    m_fls_openmode = openmode;
}
// 00EB5C83 - 00EB5C97
void load_para_filewrite(U8 filehandle, U8 datalength, U8* bufadd)
{
    m_fls_filehandle = filehandle;
    m_fls_datalength = datalength;
    m_fls_input = bufadd - MCU_memory;
}
// 00EB5C98 - 00EB5CF4
void get_add(UINT8 y)
{
    //                 m_fls_filepoint
    MCU_memory[0x82] = MCU_memory[0x2113];
    y -= 0x04; // 指向filename
    // m_fls_bank_4
    MCU_memory[0x211B] = MCU_memory[0x2122 + y] + MCU_memory[0x2114];
    MCU_memory[0x83] = (MCU_memory[0x211B] & 0x0F) | 0x40;
    y += 1;
    MCU_memory[0x211C] = MCU_memory[0x2122 + y] + MCU_memory[0x2115];
    m_fls_bank_4 >>= 4;
    y += 1;
    //                                             m_fls_filepoint
    UINT32 tmp32 = m_fls_datalength + *(UINT32*)(MCU_memory + 0x2113);
    MCU_memory[0x2122 + y] = tmp32;
    y += 1;
    MCU_memory[0x2122 + y] = tmp32>>8;
    y += 1;
    MCU_memory[0x2122 + y] = tmp32>>16;
    // BANK映射 0x04:m_fls_bank_4+0x0200
    fun_fls_SetBank4k_4();
}
// 00EB5F10 - 00EB5F3D
void fun_fls_return_para_fileopen(U16 , U8 , U8 , U8* filehandle, U32* filelength)
{
    *filehandle = m_fls_filehandle;
    *filelength = *(UINT32*)(MCU_memory + 0x210C) & 0x00FFFFFF;
}
// 00EB5F3E - 00EB6081
UINT8 _00EB5F3E()
{
    UINT8 x;
    MCU_memory[0x2153] = 0x00;
_6F43:
    //                               m_fls_filelength
    MCU_memory[0x2159] = (*(UINT16*)(MCU_memory + 0x210C) + 0x00FF) >> 8;
    // m_fls_SectorList=0x07*(FLASHCAPACITY-1)+1
    fun_fls_init3();
    UINT8 a = m_fls_SectorList;
    goto _6F6B;
_6F5A:
    m_fls_Capacity--;
    if (m_fls_Capacity == 0x00)
    {
        return 0x00;
    }
    a = m_fls_SectorList - 0x07;
    m_fls_SectorList = a;
_6F6B:
    m_fls_bank_4 = a;
    // BANK映射 0x04:m_fls_bank_4+0x0200
    fun_fls_SetBank4k_4();
    MCU_memory[0x2155] = m_fls_SectorList + 0x03;
    m_fls_bank_B = MCU_memory[0x2155];
    // BANK映射 0x0B:m_fls_bank_B+0x0200
    fun_fls_SetBank4k_B();
    UINT8 y = 0x00;
    m_fls_block = 0x40FF;
    _6F94:
    a = flash_emu_read(m_fls_block+y);
    if (a == 0x02)
    {
    _7024:
        MCU_memory[0x2152] = y;
        m_fls_point = 0x0B00 + MCU_memory[0x8A];
        m_fls_point <<= 4;
        x = 0x00;
        _7041:
        if (y == 0x10)
        {
            goto _7010;
        }
    _7045:
        if (flash_emu_read(m_fls_point + y) != 0xFF)
        {
        _704B:
            x = 0x00;
            y++;
            MCU_memory[0x2152] = y;
            goto _7041;
        }
    _7054:
        x++;
        y++;
        if (x < MCU_memory[0x2159])
        {
            goto _7041;
        }
    _705B:
        m_fls_Capacity--;
        MCU_memory[0x8B] = m_fls_Capacity;
        m_fls_block <<= 4;
        m_fls_filename = m_fls_block | MCU_memory[0x2152];
        return 0x01;
    }
    else if (a == 0x03)
    {
    _7010:
        y = 0x00;
        MCU_memory[0x8A]--;
        if (MCU_memory[0x8A] == 0xFF)
        {
            goto _6F5A;
        }
        goto _6F94;
    }
    else if (a == 0xFF) 
    {
        _6FA2:
        if (MCU_memory[0x2153] == 0x00)
        {
        _6FA7:
            MCU_memory[0x2153]++;
            UINT8 tmp_fls_SectorList = m_fls_SectorList;
            UINT8 tmp_fls_Capacity = m_fls_Capacity;
            UINT16 tmp = m_fls_block;
            FileClearDataChip();
            m_fls_block = tmp;
            m_fls_Capacity = tmp_fls_Capacity;
            m_fls_SectorList = tmp_fls_SectorList;
            if (MCU_memory[0x2154] == 0x00)
            {
                goto _6F43;
            }
            _6FE8:
            m_fls_bank_4 = m_fls_SectorList;
            fun_fls_SetBank4k_4();
        }
    _6FF6:
        y = 0x00;
    _6FF8:
        m_fls_log = m_fls_block;
        m_fls_errorcode = _00EB74C9(0x02, y); // 0x02 标记某Block为已使用
        MCU_memory[0x2152] = 0x00;
        goto _705B;
    }
_6FD7:
    if (MCU_memory[0x2153])
    {
    _7020:
        return 0x00;
    }
    MCU_memory[0x2153]++;
    FileClearDataChip();
    goto _6F43;
}
// 00EB6082 - 00EB60B6
// 根据文件大小计算需要多少个0x100空间来存放，在0xBxxx对应位置标记0x02
void _00EB6082()
{
    m_fls_bank_B = MCU_memory[0x2155];
    fun_fls_SetBank4k_B();
    m_fls_point = (m_fls_filename & 0x0FFF) | 0xB000;
    UINT8 y = 0x00;
    do
    {
        _70A0:
        m_fls_log = m_fls_point;
        m_fls_errorcode = _00EB74C9(0x02, y);
        y++;
    } while (y < MCU_memory[0x2159]);
}
// 00EB616A - 00EB618C
void _00EB616A()
{
    UINT8 tmp = m_fls_filetype;
    m_fls_filetype = 0x00;
    _00EB621E();
    if (m_fls_fileorder2 >= 0x00FF)
    {
    _7185:
        FileClearIndexChip();
    }
_7188:
    m_fls_filetype = tmp;
}
// 00EB618D - 00EB621D
UINT8 _00EB618D()
{
    m_fls_fileorder2 = 0x0000;
    // m_fls_SectorList = 0x01;m_fls_Capacity = 0x00;m_fls_BlgIndex = 0x00;
    fun_fls_init2();
    goto _71B2;
_719E:
    m_fls_Capacity++;
    if (m_fls_Capacity == FLASHCAPACITY)
    {
        return 0x00;
    }
    m_fls_BlgIndex += 0x07;
_71B2:
    m_fls_bank_A = m_fls_BlgIndex;
    fun_fls_SetBank4k_A();
    m_fls_offset = 0xA000;
_71C7:
    if (flash_emu_read(m_fls_offset + 0x0F) != m_fls_filetype)
    {
    _71CE:
        m_fls_offset += 0x0010;
        if (MCU_memory[0x87] == 0xB0)
        {
            goto _719E;
        }
        else
        {
            goto _71C7;
        }

    }
    else
    {
        _71E6:
        m_fls_fileorder2 += 0x0001;
        if (m_fls_fileorder2 != m_fls_fileorder1)
        {
            goto _71CE;
        }
    _71FC:
        m_fls_filename = *(UINT16*)(MCU_memory + m_fls_offset);
        for (UINT8 y = 2; y != 0x0C; y++)
        {
            MCU_memory[0x2100 + y] = MCU_memory[m_fls_offset + y];
        }
    }
    return 0x01;
}
// 00EB621E - 00EB6239
// 通过m_fls_fileorder2返回搜索到的文件数量
void _00EB621E()
{
    m_fls_fileorder1 = 0xFFFF;
    if (m_fls_filetype >= 0x20)
    { // 用户文件？000
        _00EB618D();
    }
    else
    { // 系统文件？
        _00EB623A();
    }
}
// 00EB623A - 00EB62FC
// 当m_fls_fileorder1为0xFFFF，则通过m_fls_fileorder2返回搜索到的文件数量
// 当m_fls_fileorder1为文件序号，则将对应序号的filename、information保存到全局变量中
UINT8 _00EB623A()
{
    m_fls_fileorder2 = 0x0000;
    // m_fls_SectorList=0x07*(FLASHCAPACITY-1)+1
    fun_fls_init3();
    UINT8 a = m_fls_SectorList;
    goto _725C;
_724B:
    m_fls_Capacity--;
    if (m_fls_Capacity == 0x00)
    {
        return 0x00;
    }
    m_fls_SectorList -= 0x07;
_725C:
    m_fls_bank_4 = a;
    // BANK映射 0x04:0x0200+a
    fun_fls_SetBank4k_4();
    m_fls_block = 0x40FF;
_7271:
    a = flash_emu_read(m_fls_block);
    if (a == 0x03)
    {
        _7288:
        MCU_memory[0x2152] = a;
        m_fls_bank_A = ((m_fls_Capacity - 0x01) << 8) + MCU_memory[0x8A];
        // BANK映射 0x0A:m_fls_bank_A+0x0200
        fun_fls_SetBank4k_A();
        m_fls_offset = 0xA000;
        while (flash_emu_read(m_fls_offset + 0x0F) != m_fls_filetype)
        {
        _72AD:
            m_fls_offset += 0x0010;
            if (MCU_memory[0x87] == 0xB0)
            {
                goto _727D;
            }
        }
    }
    else if (a == 0x02)
    {
    _727D:
        MCU_memory[0x8A]--;
        a = MCU_memory[0x8A];
        if (a == 0xFF)
        {
            goto _724B;
        }
        goto _7271;
    }
    else
    {
        _72C1:
        return 0x00;
    }

    _72C5:
    m_fls_fileorder2 += 0x0001;
    if (m_fls_fileorder2 != m_fls_fileorder1)
    {
        goto _72AD;
    }
    _72E3:
    m_fls_filename = *(UINT16*)(MCU_memory + m_fls_offset);
    for (UINT8 i = 0; i < 10; i++)
    {
        m_fls_information[i] = flash_emu_read(m_fls_offset + 2+i);
    }
    return 0x01;
}
// 00EB62FD - 00EB638B
// 保存filename、information、filelength到m_fls_offset
void _00EB62FD()
{
    UINT8 y = 0x00;
    m_fls_log = m_fls_offset;
    m_fls_errorcode = _00EB74C9(m_fls_filename&0xFF, 0x00);
    y++;
    m_fls_log = m_fls_offset;
    m_fls_errorcode = _00EB74C9(m_fls_filename>>8, y);
    y++;
    UINT8 x = 0;
    do
    {
    _7325:
        m_fls_log = m_fls_offset;
        m_fls_errorcode = _00EB74C9(m_fls_information[x], y);
        MCU_memory[0x2152] = x;
        y++;
        x = MCU_memory[0x2152];
        x++;
    } while (x != 0x0A);
    _7342:
    m_fls_log = m_fls_offset;
    // m_fls_filelength
    m_fls_errorcode = _00EB74C9(MCU_memory[0x210C], y);
    y++;
    m_fls_log = m_fls_offset;
    m_fls_errorcode = _00EB74C9(MCU_memory[0x210D], y);
    y++;
    m_fls_log = m_fls_offset;
    m_fls_errorcode = _00EB74C9(MCU_memory[0x210E], y);
    y++;
    m_fls_log = m_fls_offset;
    m_fls_errorcode = _00EB74C9(m_fls_filetype|0x80, y);
}
// 00EB638C - 00EB64A9
void _00EB638C()
{
    // m_fls_SectorList = 0x01;m_fls_Capacity = 0x00;m_fls_BlgIndex = 0x00;
    fun_fls_init2();
    UINT8 a = m_fls_SectorList;
    goto _73AC;
_7395:
    m_fls_Capacity++;
    if (m_fls_Capacity == FLASHCAPACITY)
    {
        return;
    }
_73A3:
    m_fls_SectorList += 0x07;
    a = m_fls_SectorList;
_73AC:
    m_fls_bank_4 = a;
    // BANK映射 0x04:0x0200+a
    fun_fls_SetBank4k_4();
    UINT8 y = 0x00;
    m_fls_block = 0x4000;
    MCU_memory[0x89] = 0x90;
    MCU_memory[0x2195] = 0x00;
    _73CA:
    // 擦除bank9映射的4K数据
    _00EB7347();
    flash_emu_write(0x9000, 0x30); // Sector-Erase
    *(UINT16*)(MCU_memory + 0x2193) = 0x0000;
    while (flash_emu_read(0x9000) != 0xFF)
    {
    _73E6:
        MCU_memory[0x2193]++;
        if (MCU_memory[0x2193] == 0x00)
        {
            MCU_memory[0x2194]++;
            if (MCU_memory[0x2194] >= 0xFF)
            {
                m_fls_errorcode = 0x00;
                break;
            }
        }
    }
_73FD:
    m_fls_log = 0x9000;
    m_fls_errorcode = _00EB6FCF();
    if (m_fls_errorcode != 0x01)
    {
        MCU_memory[0x2195]++;
        if (MCU_memory[0x2195] < 0x08)
        {
            goto _73CA;
        }
    }
_7419:
    _741B:
    a = flash_emu_read(m_fls_block);
    if (a)
    {
        if (a != 0xFF)
        {
        _7423:
            MCU_memory[0x88] = MCU_memory[0x8A];
            m_fls_log = m_fls_buf;
            m_fls_errorcode = _00EB74C9(flash_emu_read(m_fls_block), 0x00);
        }
    _7437:
        MCU_memory[0x8A]++;
        if (MCU_memory[0x8A])
        {
            goto _741B;
        }
        _00EB51FD();
        goto _7395;
    }
_7444:
    m_fls_bank_B = (m_fls_Capacity << 8) + MCU_memory[0x8A];
    fun_fls_SetBank4k_B();
    MCU_memory[0x2195] = 0x00;
    _7457:
    // 擦除bankB映射的4K数据
    _00EB7347();
    flash_emu_write(0xB000, 0x30); // Sector-Erase
    *(UINT16*)(MCU_memory + 0x2193) = 0x0000;
    while (flash_emu_read(0xB000) != 0xFF)
    {
        _7473:
        MCU_memory[0x2193]++;
        if (MCU_memory[0x2193] == 0x00)
        {
            MCU_memory[0x2194]++;
            if (MCU_memory[0x2194] >= 0xFF)
            {
                m_fls_errorcode = 0x00;
                break;
            }
        }
    }
    _748A:
    m_fls_log = 0xB000;
    m_fls_errorcode = _00EB6FCF();
    if (m_fls_errorcode != 0x01)
    {
        MCU_memory[0x2195]++;
        if (MCU_memory[0x2195] < 0x08)
        {
            goto _7457;
        }
    }
    goto _7437;
}
// 00EB64AA - 00EB64C4
void _00EB64AA(UINT8 filehandle, UINT8* information)
{
    m_fls_filehandle = filehandle;
    for (UINT8 i = 0x00; i < 0x0A; i++)
    {
        m_fls_information[i] = information[i];
    }
}
// 00EB64EF - 00EB6511
void load_para__FileSeek(U8 filehandle, U32 fileoffset, U8 origin)
{
    m_fls_filehandle = filehandle;
    m_fls_fileoffset = fileoffset;
    m_fls_origin = origin;
}
// 00EB6512 - 00EB657C
void Load_Para_FileUpdata()
{
    UINT8 y = fun_fls_mul12(m_fls_filehandle);
    m_fls_handle_temp = y;
    y += 6;
    // m_fls_filelength
    MCU_memory[0x210C] = m_fls_Data_filehandle[y];
    y++;
    MCU_memory[0x210D] = m_fls_Data_filehandle[y];
    y++;
    MCU_memory[0x210E] = m_fls_Data_filehandle[y];
    y++;
    // m_fls_data_add
    MCU_memory[0x2170] = m_fls_Data_filehandle[y];
    MCU_memory[0x86] = MCU_memory[0x2170];
    MCU_memory[0x87] = 0x0A;
    m_fls_offset <<= 4;
    y++;
    MCU_memory[0x2171] = m_fls_Data_filehandle[y];
    MCU_memory[0x2168] = m_fls_Data_filehandle[y]; // m_fls_bank_A
    y++;
    MCU_memory[0x2172] = m_fls_Data_filehandle[y];
    MCU_memory[0x2169] = m_fls_Data_filehandle[y]; // m_fls_bank_A
    fun_fls_SetBank4k_A();
    y = 0x02;
    do
    {
        _756B:
        MCU_memory[0x2100 + y] = flash_emu_read(m_fls_offset + y);
        y++;
    } while (y != 0x0C);
    m_fls_filetype = flash_emu_read(m_fls_offset + 0x0F);
}
// 00EB6627 - 00EB6637
void fun_fls_load_para_InfSearch(UINT8 filetype, UINT16 cardkey)
{
    m_fls_filetype = filetype;
    m_fls_CardKey = cardkey;
}
// 00EB6638 - 00EB6667
void fun_fls_returnParaInfSearch(UINT16* _filename, UINT8* information)
{
    *_filename = m_fls_filename;
    for (UINT8 i = 0x00; i < 0x0A; i++)
    {
        information[i] = m_fls_information[i];
    }
}
// 00EB6723 - 00EB67F4
void fun_fls_CheckCardKey()
{
    // m_fls_SectorList=0x07*(FLASHCAPACITY-1)+1
    fun_fls_init3();
    UINT8 a = m_fls_SectorList;
    goto _773A;
_772C:
    m_fls_Capacity--;
    if (m_fls_Capacity == 0x00)
    {
        _7762:
        m_fls_errorcode = 0x00;
        _77AB:
        m_fls_errorcode = 0x00;
        return;
    }
    a = m_fls_SectorList - 0x07;
    m_fls_SectorList = a;
_773A:
    m_fls_bank_4 = a;
    fun_fls_SetBank4k_4();
    m_fls_block = 0x40FF;
    while (flash_emu_read(m_fls_block) != 0x03)
    {
    _7757:
        m_fls_block -= 1;
        if (MCU_memory[0x8A] == 0xFF)
        {
            goto _772C;
        }
    }
_776A:
    m_fls_bank_A = MCU_memory[0x8A] + (m_fls_Capacity << 8) - 0x0100;
    fun_fls_SetBank4k_A();
    m_fls_offset = 0xA000;
    UINT8 x = 0x00;
    _7785:
    if (flash_emu_read(m_fls_offset + 0x02)+(flash_emu_read(m_fls_offset + 0x03)<<8) != m_fls_CardKey)
    {
    _7796:
        m_fls_offset += 0x0010;
        x++;
        if (x)
        {
            goto _7785;
        }
        goto _7757;
    }
_77B3:
    if (flash_emu_read(m_fls_offset + 0x0F) != m_fls_filetype)
    {
        goto _7796;
    }
_77BC:
    m_fls_filename = flash_emu_read(m_fls_offset) + (flash_emu_read(m_fls_offset + 0x01) << 8);
    UINT8 y = 0x02;
    // information
    do
    {
    _77CA:
        MCU_memory[0x2100+y] = flash_emu_read(m_fls_offset + y);
        y++;
    } while (y != 0x0C);
    // filelength
    MCU_memory[0x210C] = flash_emu_read(m_fls_offset + y);
    y++;
    MCU_memory[0x210D] = flash_emu_read(m_fls_offset + y);
    y++;
    MCU_memory[0x210E] = flash_emu_read(m_fls_offset + y);
    *(UINT16*)(MCU_memory + 0x2157) = m_fls_bank_A;
    MCU_memory[0x2156] = x;
}
// 00EB67F5 - 00EB6813
UINT8 fun_fls_ResumeBank()
{
    PhysicalBankNumber = m_fls_updata;
    m_fun_changeDataBank(0x0A, 0x01);
    m_fls_offset = m_fls_buf;
    return set_valubable_point();
}
// 00EB6936 - 00EB6952
void fun_fls_CopyBank()
{
    m_fls_updata = MCU_bankaddresslist[0x0A];
    m_fls_buf = m_fls_offset;
}
// 00EB6A71 - 00EB6AA3
UINT8 return_Para_BrowsefileByOrder(U8 filetype, U16 fileorder, U16* filename, U8* information)
{
    *filename = m_fls_filename;
    for (UINT8 i = 0x00; i < 10; i++)
    {
        information[i] = m_fls_information[i];
    }
    return m_fls_errorcode;
}
// 00EB6B84 - 00EB6BEA
void m_fun_WriteNewInf()
{
    m_fls_offset = 0x0A00 + MCU_memory[0x2152];
    m_fls_offset <<= 4;
    m_fls_buf = m_fls_offset - 0x1000;
    UINT8 y = 0x00;
    do
    {
    _7BAA:
        m_fls_log = m_fls_buf;
        m_fls_errorcode = _00EB74C9(flash_emu_read(m_fls_offset + y), y);
        y++;
    } while (y != 0x02);
    do
    {
    _7BBF:
        m_fls_log = m_fls_buf;
        m_fls_errorcode = _00EB74C9(MCU_memory[0x2100 + y], y);
        y++;
    } while (y != 0x0C);
    do
    {
    _7BD5:
        m_fls_log = m_fls_buf;
        m_fls_errorcode = _00EB74C9(flash_emu_read(m_fls_offset + y), y);
        y++;
    } while (y != 0x10);
}
// 00EB6BEB - 00EB6C3A
void fun_fls_FreeSector()
{
    m_fls_FreeSector = 0x0000;
    // m_fls_SectorList = 0x01;m_fls_Capacity = 0x00;m_fls_BlgIndex = 0x00;
    fun_fls_init2();
    UINT8 a = m_fls_SectorList;
    goto _7C10;
    _7BFC:
    m_fls_Capacity++;
    if (m_fls_Capacity == FLASHCAPACITY)
    {
        return;
    }
    a = m_fls_SectorList + 0x07;
    m_fls_SectorList = a;
    _7C10:
    m_fls_bank_4 = a;
    fun_fls_SetBank4k_4();
    UINT8 y = 0x00;
_7C1D:
    m_fls_block = 0x4000;
    _7C25:
    if (flash_emu_read(m_fls_block + y) == 0xFF)
    {
        m_fls_FreeSector += 1;
    }
_7C33:
    MCU_memory[0x8A]++;
    if (MCU_memory[0x8A])
    {
        goto _7C25;
    }
    goto _7BFC;
}
// 00EB6E48 - 00EB6F4E
UINT8 fun_flash_check_data_room_big()
{
    // m_fls_filelength
    m_fls_databag_num = (*(UINT32*)(MCU_memory + 0x210C) + 0x000FFF) >> 8;
    m_fls_databag_num >>= 4;
    // m_fls_SectorList = 0x01;m_fls_Capacity = 0x00;m_fls_BlgIndex = 0x00;
    fun_fls_init2();
    UINT8 a = m_fls_SectorList;
    goto _7E93;
_7E7F:
    m_fls_Capacity++;
    if (m_fls_Capacity == FLASHCAPACITY)
    {
        return 0x00;
    }
    a = m_fls_SectorList + 0x07;
    m_fls_SectorList = a;
_7E93:
    m_fls_bank_4 = a;
    // BANK映射 0x04:m_fls_bank_4+0x0200
    fun_fls_SetBank4k_4();
    m_fls_block = 0x4000;
_7EA8:
    a = flash_emu_read(m_fls_block);
    if (a == 0xFF)
    {
    _7EC3:
        m_fls_FreeSector = 0x0000;
        m_fls_point = (m_fls_Capacity<<8) + MCU_memory[0x8A];
        m_fls_filename = (m_fls_Capacity<<8) + MCU_memory[0x8A];
        m_fls_FirstSector = m_fls_SectorList;
        m_fls_filename <<= 4;
        while (flash_emu_read(m_fls_block) == 0xFF)
        {
        _7EFE:
            m_fls_FreeSector += 0x0001;
            if (m_fls_FreeSector == m_fls_databag_num)
            {
                return 0x01;
            }
            _7F1C:
            MCU_memory[0x8A]++;
            if (MCU_memory[0x8A] == 0x00)
            {
                _7F22:
                m_fls_Capacity++;
                if (m_fls_Capacity == FLASHCAPACITY)
                {
                    return 0x00;
                }
                _7F2D:
                m_fls_SectorList += 0x07;
                m_fls_bank_4 = m_fls_SectorList;
                // BANK映射 0x04:m_fls_bank_4+0x0200
                fun_fls_SetBank4k_4();
                m_fls_block = 0x4000;
            }
        }
    }
    else if ((a == 0x02) || (a == 0x03))
    {
        _7EBF:
        return 0x00;
    }
_7EB6:
    MCU_memory[0x8A]++;
    if (MCU_memory[0x8A])
    {
        goto _7EA8;
    }
    goto _7E7F;
}
// 00EB6FB5 - 00EB6FCE
// 返回flash地址0x6000的值
UINT8 _00EB6FB5(UINT8 a)
{
    // 备份0x09,0x0A,0x0B,0x0C,0x04的BANK映射
    fun_fls_savebank();
    m_fls_bank_4 = 0x0006;
    // BANK映射 0x04:0x0206
    fun_fls_SetBank4k_4();
    UINT8 tmp = flash_emu_read(0x4000);
    // 恢复0x09,0x0A,0x0B,0x0C,0x04的bank映射
    _00EB54B2();
    return tmp;
}
// 00EB6FCF - 00EB7004
// m_fls_log所在Sector都擦除完成返回0x01，否则返回0x00
UINT8 _00EB6FCF()
{
    m_fls_log &= 0xF000;
    MCU_memory[0x219C] = (m_fls_log >> 8) + 0x10;
    while (flash_emu_read(m_fls_log) == 0xFF)
    {
    _7FE9:
        m_fls_log += 0x0001;
        if ((m_fls_log >> 8) >= MCU_memory[0x219C])
        {
        _7FFB:
            return 0x01;
        }
    }
_8000:
    return 0x00;
}
// 00EB7018 - 00EB70A5
// Address x16 Mode
void _00EB7018()
{
    MCU_memory[0x219F] = 0x02;
    FlashInit();
    // 备份0x09,0x0A,0x0B,0x0C,0x04的BANK映射
    fun_fls_savebank();
    // BANK映射 0x09:0x0202, 0x0A:0x0203, 0x0B:0x0204, 0x0C:0x0205
    // BANK映射 0x04:0x0200
    fun_fls_SetBank16k();
    UINT8 x = 0x00;
    // Software ID Exit/CFI Exit/Sec ID Exit
    flash_emu_write(jiami_c555, 0xAA);
    flash_emu_write(jiami_9aaa, 0x55);
    flash_emu_write(jiami_c555, 0xF0);
    // CFI Query Entry
    flash_emu_write(jiami_c555, 0xAA);
    flash_emu_write(jiami_9aaa, 0x55);
    flash_emu_write(jiami_c555, 0x98);
    if ((flash_emu_read(jiami_4010) == 'Q')
        && (flash_emu_read(jiami_4011) == 'R')
        && (flash_emu_read(jiami_4012) == 'Y'))
    {
        _805F:
        MCU_memory[0x2152] = 0x01 << (flash_emu_read(jiami_4027) - 0x14);
    }
    else
    {
        _8075:
        MCU_memory[0x2152] = 0x02;
        MCU_memory[0x219F] = 0x01;
    }
    FLASHCAPACITY = MCU_memory[0x2152]; // Flash Size (MB)
    // Software ID Exit/CFI Exit/Sec ID Exit
    flash_emu_write(jiami_c555, 0xAA);
    flash_emu_write(jiami_9aaa, 0x55);
    flash_emu_write(jiami_c555, 0xF0);
    // 恢复0x09,0x0A,0x0B,0x0C,0x04的bank映射
    _00EB54B2();
}
// 00EB70A6 - 00EB714E
// 注释的部分为操作Flash，这里直接给出结果，跳过操作步骤
// Address x8 Mode
void _00EB70A6()
{
    MCU_memory[0x219F] = 0x01;
    FlashInit();
    // 备份0x09,0x0A,0x0B,0x0C,0x04的BANK映射
    fun_fls_savebank();
    PhysicalBankNumber = 0x0200;
    // BANK映射 0x09:0x0200, 0x0A:0x0201, 0x0B:0x0202, 0x0C:0x0203
    m_fun_changeDataBank(0x09, 0x04);
    UINT8 x = 0x00;
    m_fls_bank_4 = 0x0000;
    // BANK映射 0x04:0x0200
    fun_fls_SetBank4k_4();
    // Software ID Exit/CFI Exit/Sec ID Exit
    flash_emu_write(jiami_9aaa, 0xAA);
    flash_emu_write(0x9555, 0x55);
    flash_emu_write(jiami_9aaa, 0xF0);
    // CFI Query Entry
    flash_emu_write(jiami_9aaa, 0xAA);
    flash_emu_write(0x9555, 0x55);
    flash_emu_write(jiami_9aaa, 0x98);

    // CFI QUERY IDENTIFICATION STRING
    if ((flash_emu_read(0x4020) == 'Q')
        && (flash_emu_read(0x4022) == 'R')
        && (flash_emu_read(0x4024) == 'Y'))
    {
        _8108:
        // Device size = 2^N Bytes(15H = 21; 2^21 = 2 MByte)
        MCU_memory[0x2152] = 0x01 << (flash_emu_read(0x404E) - 0x14);
    }
    else
    {
        _811E:
        MCU_memory[0x2152] = 0x02;
        MCU_memory[0x219F] = 0x00;
    }
    FLASHCAPACITY = MCU_memory[0x2152]; // Flash Size (MB)
    // Software ID Exit/CFI Exit/Sec ID Exit
    flash_emu_write(jiami_c555, 0xAA);
    flash_emu_write(jiami_9aaa, 0x55);
    flash_emu_write(jiami_c555, 0xF0);
    // 恢复0x09,0x0A,0x0B,0x0C,0x04的bank映射
    _00EB54B2();
}
// 00EB7165 - 00EB7262
void _00EB7165()
{
    // 备份0x09,0x0A,0x0B,0x0C,0x04的BANK映射
    fun_fls_savebank();
    // BANK映射 0x09:0x0202, 0x0A:0x0203, 0x0B:0x0204, 0x0C:0x0205
    // BANK映射 0x04:0x0200
    fun_fls_SetBank16k();
    m_fls_bank_4 = 0x0006;
    // BANK映射 0x04:0x0206
    fun_fls_SetBank4k_4();
    for (UINT16 i=0; i<0x100; i++)
    {
        MCU_memory[0x2400 + i] = flash_emu_read(0x4000 + i);
    }
    m_fls_bank_4 = 0x0000;
    // BANK映射 0x04:0x0200
    fun_fls_SetBank4k_4();
    flash_emu_write(0x4AAA, 0xAA);
    flash_emu_write(0x4555, 0x55);
    flash_emu_write(0x4AAA, 0x80);
    flash_emu_write(0x4AAA, 0xAA);
    flash_emu_write(0x4555, 0x55);
    flash_emu_write(0x4AAA, 0x10); // Chip-Erase
    m_fls_bank_4 = 0x0006;
    // BANK映射 0x04:0x0206
    fun_fls_SetBank4k_4();
    *(UINT16*)(MCU_memory + 0x2193) = 0x0000;
    while (flash_emu_read(0x9000) != 0xFF)
    {
    _81D9:
        *(UINT16*)(MCU_memory + 0x2193) += 1;
        if (*(UINT16*)(MCU_memory + 0x2193) >= 0xFF00)
        {
            _81EB:
            m_fls_errorcode = 0x00;
            break;
        }
    }
_81F0:
    for (UINT16 i = 0; i < 0x100; i++)
    {
        if (MCU_memory[0x2400 + i])
        {
        _81F7:
            _00EB741C();
            flash_emu_write(0x4000 + i, MCU_memory[0x2400 + i]);
            fun_fls_delay_buf();
        }
    }
_8209:
    m_fls_bank_4 = 0x0001;
    // BANK映射 0x04:0x0201
    fun_fls_SetBank4k_4();
_8216:
    MCU_memory[0x2152] = 0x07 * FLASHCAPACITY;
    MCU_memory[0x2193] = 0x00;
    for (UINT8 i = 0; i != MCU_memory[0x2152]; i++)
    {
        _8230:
        _00EB741C();
        flash_emu_write(0x4000 + i, 0x04);
        while (flash_emu_read(0x4000 + i) != 0x04)
        {
        _823F:
            MCU_memory[0x2193]++;
            if (MCU_memory[0x2193] == 0x00)
            {
                m_fls_errorcode = 0x00;
                break;
            }
        }
    _824C:
        MCU_memory[0x2193] = 0x00;
    }
    // 恢复0x09,0x0A,0x0B,0x0C,0x04的bank映射
    _00EB54B2();
    return /*0x01*/;
}
// 00EB7263 - 00EB7346
void _00EB7263()
{
    // 备份0x09,0x0A,0x0B,0x0C,0x04的BANK映射
    fun_fls_savebank();
    // BANK映射 0x09:0x0202, 0x0A:0x0203, 0x0B:0x0204, 0x0C:0x0205
    // BANK映射 0x04:0x0200
    fun_fls_SetBank16k();
    m_fls_bank_4 = 0x0006;
    // BANK映射 0x04:0x0206
    fun_fls_SetBank4k_4();
    for (UINT16 i = 0; i < 0x100; i++)
    {
        MCU_memory[0x2400 + i] = flash_emu_read(0x4000 + i);
    }
    flash_emu_write(jiami_c555, 0xAA);
    flash_emu_write(jiami_9aaa, 0x55);
    flash_emu_write(jiami_c555, 0x80);
    flash_emu_write(jiami_c555, 0xAA);
    flash_emu_write(jiami_9aaa, 0x55);
    flash_emu_write(jiami_c555, 0x10); // Chip-Erase
    *(UINT16*)(MCU_memory + 0x2193) = 0x0000;
    while (flash_emu_read(0x9000) != 0xFF)
    {
    _82BD:
        *(UINT16*)(MCU_memory + 0x2193) += 1;
        if (*(UINT16*)(MCU_memory + 0x2193) == 0xFF00)
        {
            m_fls_errorcode = 0x00;
            break;
        }
    }
_82D4:
    for (UINT16 i = 0; i < 0x100; i++)
    {
        if (MCU_memory[0x2400 + i])
        {
        _81F7:
            _00EB741C();
            flash_emu_write(0x4000 + i, MCU_memory[0x2400 + i]);
            fun_fls_delay_buf();
        }
    }
    m_fls_bank_4 = 0x0001;
    // BANK映射 0x04:0x0201
    fun_fls_SetBank4k_4();
_82FA:
    MCU_memory[0x2152] = 0x07 * FLASHCAPACITY;
    MCU_memory[0x2193] = 0x00;
    for (UINT8 i = 0; i != MCU_memory[0x2152]; i++)
    {
        _8314:
        _00EB741C();
        flash_emu_write(0x4000 + i, 0x04);
        while (flash_emu_read(0x4000 + i) != 0x04)
        {
        _8323:
            MCU_memory[0x2193]++;
            if (MCU_memory[0x2193] == 0x00)
            {
                m_fls_errorcode = 0x00;
                break;
            }
        }
    _8330:
        MCU_memory[0x2193] = 0x00;
    }
    // 恢复0x09,0x0A,0x0B,0x0C,0x04的bank映射
    _00EB54B2();
    return /*0x01*/;
}
// 00EB7347 - 00EB735C
void _00EB7347()
{
    if (MCU_memory[0x219F] == 0x02)
    {
        _8358:
        _00EB73A3();
    }
    else
    { // if (MCU_memory[0x219F] == 0x01)
    _8353:
        _00EB735D();
    }
}
// 00EB735D - 00EB73A2
void _00EB735D()
{
    UINT16 tmp = MCU_bankaddresslist[0x0B];
    MCU_bankaddresslist[0x0B] = 0x0200;
    flash_emu_write(0xBAAA, 0xAA);
    flash_emu_write(jiami_b555, 0x55);
    flash_emu_write(0xBAAA, 0x80);
    flash_emu_write(0xBAAA, 0xAA);
    flash_emu_write(jiami_b555, 0x55);
    MCU_bankaddresslist[0x0B] = tmp;
}
// 00EB73A3 - 00EB741B
void _00EB73A3() // XXXX-Erase
{
    UINT16 tmp1 = MCU_bankaddresslist[0x0B];
    UINT16 tmp2 = MCU_bankaddresslist[0x0C];
    MCU_bankaddresslist[0x0B] = 0x0205;
    MCU_bankaddresslist[0x0C] = 0x0202;
    flash_emu_write(jiami_b555, 0xAA);
    flash_emu_write(jiami_caaa, 0x55);
    flash_emu_write(jiami_b555, 0x80);
    flash_emu_write(jiami_b555, 0xAA);
    flash_emu_write(jiami_caaa, 0x55);
    MCU_bankaddresslist[0x0C] = tmp2;
    MCU_bankaddresslist[0x0B] = tmp1;
}
// 00EB741C - 00EB7431
// 根据型号，进 Flash Program
void _00EB741C()
{
    if (MCU_memory[0x219F] == 0x01)
    {
        _00EB7432();
    }
    else if (MCU_memory[0x219F] == 0x02)
    {
        _00EB7464();
    }
}
// 00EB7432 - 00EB7463
// Flash Program
void _00EB7432()
{
    UINT16 tmp = MCU_bankaddresslist[0x0B];
    MCU_bankaddresslist[0x0B] = 0x0200;
    flash_emu_write(0xBAAA, 0xAA);
    flash_emu_write(jiami_b555, 0x55);
    flash_emu_write(0xBAAA, 0xA0); // Program
    MCU_bankaddresslist[0x0B] = tmp;
}
// 00EB7464 - 00EB74C8
// Flash Program
void _00EB7464()
{
    UINT16 tmpB = MCU_bankaddresslist[0x0B];
    UINT16 tmpC = MCU_bankaddresslist[0x0C];
    MCU_bankaddresslist[0x0B] = 0x0205;
    MCU_bankaddresslist[0x0C] = 0x0202;
    flash_emu_write(jiami_b555, 0xAA);
    flash_emu_write(jiami_caaa, 0x55);
    flash_emu_write(jiami_b555, 0xA0); // Program
    MCU_bankaddresslist[0x0C] = tmpC;
    MCU_bankaddresslist[0x0B] = tmpB;
}
// 00EB74C9 - 00EB74DE
// 数值a存到flash的m_fls_log+y地址
UINT8 _00EB74C9(UINT8 a, UINT8 y)
{
    if (MCU_memory[0x219F] == 0x02)
    {
        return _00EB778F(a, y);
    }
    else
    { // if (MCU_memory[0x219F] == 0x01)
        return _00EB74DF(a, y);
    }
}
// 00EB74DF - 00EB778E
UINT8 _00EB74DF(UINT8 a, UINT8 y)
{
    MCU_memory[0x2196] = a;
    MCU_memory[0x2197] = y;
    MCU_memory[0x2195] = 0x00;
    MCU_memory[0x2198] = (MCU_memory[0x8D] & 0xF0) == 0xB0 ? 0x0A : 0x0B;
    *(UINT16*)(MCU_memory + 0x90) = (MCU_memory[0x2198] << 12) | 0x0AAA;
    *(UINT16*)(MCU_memory + 0x92) = (MCU_memory[0x2198] << 12) | 0x0555;
    y = 0x00;
    *(UINT16*)(MCU_memory + 0x219D) = MCU_bankaddresslist[MCU_memory[0x2198]];
    MCU_bankaddresslist[MCU_memory[0x2198]] = 0x0200;
    flash_emu_write(*(UINT16*)(MCU_memory + 0x90)+y, 0xAA);
    flash_emu_write(*(UINT16*)(MCU_memory + 0x92)+y, 0x55);
    flash_emu_write(*(UINT16*)(MCU_memory + 0x90)+y, 0xA0); // Program
    y = MCU_memory[0x2197];
    flash_emu_write(m_fls_log + y, MCU_memory[0x2196]);
    MCU_memory[0x2193] = 0x00;
    _855B:
    if (flash_emu_read(m_fls_log + y) != MCU_memory[0x2196])
    {
        _8562:
        MCU_memory[0x2193]++;
        if (MCU_memory[0x2193] != 0x00)
        {
            goto _855B;
        }
        MCU_memory[0x2195]++;
        if (MCU_memory[0x2195] < 0x08)
        {
            goto _857C;
        }
        else
        {
            goto _876E;
        }
    }
    _8577:
    a = 0x01;
    goto _8770;
_857C:
    *(UINT16*)(MCU_memory + 0x2199) = m_fls_log + MCU_memory[0x2197];
    y = 0x00;
_858E:
    // 擦除bankC映射的4K数据
    flash_emu_write(*(UINT16*)(MCU_memory + 0x90) + y, 0xAA);
    flash_emu_write(*(UINT16*)(MCU_memory + 0x92) + y, 0x55);
    flash_emu_write(*(UINT16*)(MCU_memory + 0x90) + y, 0x80);
    flash_emu_write(*(UINT16*)(MCU_memory + 0x90) + y, 0xAA);
    flash_emu_write(*(UINT16*)(MCU_memory + 0x92) + y, 0x55);
    flash_emu_write(0xC000, 0x30); // Sector-Erase
    *(UINT16*)(MCU_memory + 0x2193) = 0x0000;
    while (flash_emu_read(0xC000) != 0xFF)
    {
    _85BD:
        *(UINT16*)(MCU_memory + 0x2193) += 0x0001;
        if (*(UINT16*)(MCU_memory + 0x2193) >= 0xFF00)
        {
            _85D2:
            MCU_memory[0x2195]++;
            if (MCU_memory[0x2195] < 0x08)
            {
                goto _858E;
            }
            else
            {
                goto _876E;
            }
        }
    }
_85DF:
    m_fls_log = 0xC000;
    if (_00EB6FCF() != 0x01)
    {
    _85EE:
        MCU_memory[0x2195]++;
        if (MCU_memory[0x2195] < 0x08)
        {
            goto _858E;
        }
        else
        {
            goto _876E;
        }
    }
    else
    {
    _85FB:
        *(UINT16*)(MCU_memory + 0x8E) = (MCU_memory[0x219A] & 0xF0) << 8;
        m_fls_log = 0xC000;
        _860E:
        if (*(UINT16*)(MCU_memory + 0x8E) == *(UINT16*)(MCU_memory + 0x2199))
        {
            _861C:
            a = MCU_memory[0x2196];
        }
        else
        {
        _8622:
            a = flash_emu_read(*(UINT16*)(MCU_memory + 0x8E)+y);
        }
    _8624:
        if (a != 0xFF)
        {
        _8628:
            MCU_memory[0x219B] = a;
            flash_emu_write(*(UINT16*)(MCU_memory + 0x90) + y, 0xAA);
            flash_emu_write(*(UINT16*)(MCU_memory + 0x92) + y, 0x55);
            flash_emu_write(*(UINT16*)(MCU_memory + 0x90) + y, 0xA0); // Program
            flash_emu_write(m_fls_log + y, MCU_memory[0x219B]);
            MCU_memory[0x2193] = 0x00;
            while (flash_emu_read(m_fls_log + y) != MCU_memory[0x219B])
            {
                _864F:
                MCU_memory[0x2193]++;
                if (MCU_memory[0x2193] == 0x00)
                {
                    MCU_memory[0x2195]++;
                    if (MCU_memory[0x2195] < 0x08)
                    {
                        goto _858E;
                    }
                    else
                    {
                        goto _876E;
                    }
                }
            }
        }
    _8667:
        *(UINT16*)(MCU_memory + 0x8E) += 0x0001;
        m_fls_log += 0x0001;
        if (MCU_memory[0x8D] < 0xD0)
        {
            goto _860E;
        }
        _8688:
        m_fls_log = *(UINT16*)(MCU_memory + 0x2199);
        flash_emu_write(*(UINT16*)(MCU_memory + 0x90) + y, 0xAA);
        flash_emu_write(*(UINT16*)(MCU_memory + 0x92) + y, 0x55);
        flash_emu_write(*(UINT16*)(MCU_memory + 0x90) + y, 0x80);
        flash_emu_write(*(UINT16*)(MCU_memory + 0x90) + y, 0xAA);
        flash_emu_write(*(UINT16*)(MCU_memory + 0x92) + y, 0x55);
        flash_emu_write(m_fls_log + y, 0x30); // Sector-Erase
        *(UINT16*)(MCU_memory + 0x2193) = 0x0000;
        while (flash_emu_read(m_fls_log + y) != 0xFF)
        {
            _86BF:
            *(UINT16*)(MCU_memory + 0x2193) += 0x0001;
            if (*(UINT16*)(MCU_memory + 0x2193) >= 0xFF00)
            {
                _86D4:
                MCU_memory[0x2195]++;
                if (MCU_memory[0x2195] < 0x08)
                {
                    goto _8688;
                }
                else
                {
                    goto _876E;
                }
            }
        }
    _86E1:
        if (_00EB6FCF() != 0x01)
        {
            MCU_memory[0x2195]++;
            if (MCU_memory[0x2195] < 0x08)
            {
                goto _8688;
            }
            else
            {
                goto _876E;
            }
        }
        else
        {
        _86F5:
            *(UINT16*)(MCU_memory + 0x8E) = 0xC000;
            *(UINT16*)(MCU_memory + 0x8C) = (MCU_memory[0x219A] & 0xF0) << 8;
        _8708:
            a = flash_emu_read(*(UINT16*)(MCU_memory + 0x8E) + y);
            if (a != 0xFF)
            {
                _870E:
                MCU_memory[0x219B] = a;
                flash_emu_write(*(UINT16*)(MCU_memory + 0x90) + y, 0xAA);
                flash_emu_write(*(UINT16*)(MCU_memory + 0x92) + y, 0x55);
                flash_emu_write(*(UINT16*)(MCU_memory + 0x90) + y, 0xA0); // Program
                flash_emu_write(m_fls_log + y, MCU_memory[0x219B]);
                MCU_memory[0x2193] = 0x00;
                while (flash_emu_read(m_fls_log + y) != MCU_memory[0x219B])
                {
                    MCU_memory[0x2193]++;
                    if (MCU_memory[0x2193] == 0x00)
                    {
                        MCU_memory[0x2195]++;
                        if (MCU_memory[0x2195] < 0x08)
                        {
                            goto _8688;
                        }
                        else
                        {
                            goto _876E;
                        }
                    }
                }
            }
            _874D:
            m_fls_log += 0x0001;
            *(UINT16*)(MCU_memory + 0x8E) += 0x0001;
            if (MCU_memory[0x8F] < 0xD0)
            {
                goto _8708;
            }
            else
            {
                goto _8577;
            }
        }
    }
_876E:
    a = 0x00;
    _8770:
    MCU_memory[0x219B] = a;
    MCU_bankaddresslist[MCU_memory[0x2198]] = *(UINT16*)(MCU_memory + 0x219D);
    y = MCU_memory[0x2197];
    return MCU_memory[0x219B];
}
// 00EB778F - 00EB7A54
UINT8 _00EB778F(UINT8 a, UINT8 y)
{
    MCU_memory[0x2196] = a;
    MCU_memory[0x2197] = y;
    MCU_memory[0x2195] = 0x00;
    MCU_memory[0x2198] = (MCU_memory[0x8D] & 0xF0) == 0xB0 ? 0x0A : 0x0B;
    *(UINT16*)(MCU_memory + 0x90) = (MCU_memory[0x2198] << 12) | 0x0AAA;
    y = 0x00;
    *(UINT16*)(MCU_memory + 0x219D) = MCU_bankaddresslist[MCU_memory[0x2198]];
    MCU_bankaddresslist[MCU_memory[0x2198]] = 0x0202;
    flash_emu_write(jiami_c555, 0xAA);
    flash_emu_write(*(UINT16*)(MCU_memory + 0x90)+y, 0x55);
    flash_emu_write(jiami_c555, 0xA0); // Program
    y = MCU_memory[0x2197];
    flash_emu_write(m_fls_log + y, MCU_memory[0x2196]);
    MCU_memory[0x2193] = 0x00;
_8802:
    while (flash_emu_read(m_fls_log + y) != MCU_memory[0x2196])
    {
    _8809:
        MCU_memory[0x2193]++;
        if (MCU_memory[0x2193] == 0x00)
        {
            MCU_memory[0x2195]++;
            if (MCU_memory[0x2195] < 0x08)
            {
                goto _8823;
            }
            else
            {
                goto _8A34;
            }
        }
    }
_881E:
    a = 0x01;
    goto _8A36;
_8823:
    *(UINT16*)(MCU_memory + 0x2199) = m_fls_log + MCU_memory[0x2197];
    y = 0x00;
_8835:
    // 擦除bankC映射的4K数据
    flash_emu_write(jiami_c555, 0xAA);
    flash_emu_write(*(UINT16*)(MCU_memory + 0x90)+y, 0x55);
    flash_emu_write(jiami_c555, 0x80);
    flash_emu_write(jiami_c555, 0xAA);
    flash_emu_write(*(UINT16*)(MCU_memory + 0x90)+y, 0x55);
    flash_emu_write(0xC000, 0x30); // Sector-Erase
    *(UINT16*)(MCU_memory + 0x2193) = 0x0000;
    while (flash_emu_read(0xC000) != 0xFF)
    {
    _886F:
        *(UINT16*)(MCU_memory + 0x2193) += 0x0001;
        if (MCU_memory[0x2194] >= 0xFF)
        {
            _8884:
            MCU_memory[0x2195]++;
            if (MCU_memory[0x2195] < 0x08)
            {
                goto _8835;
            }
            else
            {
                goto _8A34;
            }
        }
    }
_8891:
    m_fls_log = 0xC000;
    if (_00EB6FCF() != 0x01)
    {
    _88A0:
        MCU_memory[0x2195]++;
        if (MCU_memory[0x2195] < 0x08)
        {
            goto _8835;
        }
        else
        {
            goto _8A34;
        }
    }
    else
    {
    _88AD:
        *(UINT16*)(MCU_memory + 0x8E) = (MCU_memory[0x219A] & 0xF0) << 8;
        m_fls_log = 0xC000;
    _88C0:
        if (*(UINT16*)(MCU_memory + 0x8E) == *(UINT16*)(MCU_memory + 0x2199))
        {
        _88CE:
            a = MCU_memory[0x2196];
        }
        else
        {
        _88D4:
            a = flash_emu_read(*(UINT16*)(MCU_memory + 0x8E)+y);
        }
    _88D6:
        if (a != 0xFF)
        {
        _88DA:
            MCU_memory[0x219B] = a;
            flash_emu_write(jiami_c555, 0xAA);
            flash_emu_write(*(UINT16*)(MCU_memory + 0x90)+y, 0x55);
            flash_emu_write(jiami_c555, 0xA0); // Program
            flash_emu_write(m_fls_log+y, MCU_memory[0x219B]);
            MCU_memory[0x2193] = 0x00;
            while (flash_emu_read(m_fls_log+y) != MCU_memory[0x219B])
            {
                _8907:
                MCU_memory[0x2193]++;
                if (MCU_memory[0x2193] == 0x00)
                {
                    _890F:
                    MCU_memory[0x2195]++;
                    if (MCU_memory[0x2195] < 0x08)
                    {
                        goto _8835;
                    }
                    else
                    {
                        goto _8A34;
                    }
                }
            }
        }
    _891F:
        *(UINT16*)(MCU_memory + 0x8E) += 0x0001;
        m_fls_log += 0x0001;
        if (MCU_memory[0x8D] < 0xD0)
        {
            goto _88C0;
        }
    _893D:
        m_fls_log = *(UINT16*)(MCU_memory + 0x2199);
        flash_emu_write(jiami_c555, 0xAA);
        flash_emu_write(*(UINT16*)(MCU_memory + 0x90)+y, 0x55);
        flash_emu_write(jiami_c555, 0x80);
        flash_emu_write(jiami_c555, 0xAA);
        flash_emu_write(*(UINT16*)(MCU_memory + 0x90)+y, 0x55);
        flash_emu_write(m_fls_log+y, 0x30); // Sector-Erase
        *(UINT16*)(MCU_memory + 0x2193) = 0x0000;
        while (flash_emu_read(m_fls_log+y) != 0xFF)
        {
        _897F:
            *(UINT16*)(MCU_memory + 0x2193) += 0x0001;
            if (MCU_memory[0x2194] >= 0xFF)
            {
                _8994:
                MCU_memory[0x2195]++;
                if (MCU_memory[0x2195] < 0x08)
                {
                    goto _893D;
                }
                else
                {
                    goto _8A34;
                }
            }
        }
    _89A1:
        if (_00EB6FCF() != 0x01)
        {
            _89A8:
            MCU_memory[0x2195]++;
            if (MCU_memory[0x2195] < 0x08)
            {
                goto _893D;
            }
            else
            {
                goto _8A34;
            }
        }
        else
        {
        _89B5:
            *(UINT16*)(MCU_memory + 0x8E) = 0xC000;
            *(UINT16*)(MCU_memory + 0x8C) = (MCU_memory[0x219A] & 0xF0) << 8;
        _89C8:
            a = flash_emu_read(*(UINT16*)(MCU_memory + 0x8E) + y);
            if (a != 0xFF)
            {
            _89CE:
                MCU_memory[0x219B] = a;
                flash_emu_write(jiami_c555, 0xAA);
                flash_emu_write(*(UINT16*)(MCU_memory + 0x90)+y, 0x55);
                flash_emu_write(jiami_c555, 0xA0); // Program
                flash_emu_write(m_fls_log+y, MCU_memory[0x219B]);
                MCU_memory[0x2193] = 0x00;
                while (flash_emu_read(m_fls_log+y) != MCU_memory[0x219B])
                {
                    _89FB:
                    MCU_memory[0x2193]++;
                    if (MCU_memory[0x2193] == 0x00)
                    {
                        _8A03:
                        MCU_memory[0x2195]++;
                        if (MCU_memory[0x2195] < 0x08)
                        {
                            goto _893D;
                        }
                        else
                        {
                            goto _8A34;
                        }
                    }
                }
            }
        _8A13:
            m_fls_log += 0x0001;
            *(UINT16*)(MCU_memory + 0x8E) += 0x0001;
            if (MCU_memory[0x8F] < 0xD0)
            {
                goto _89C8;
            }
            else
            {
                goto _881E;
            }
        }
    }
_8A34:
    a = 0x00;
_8A36:
    MCU_memory[0x219B] = a;
    MCU_bankaddresslist[MCU_memory[0x2198]] = *(UINT16*)(MCU_memory + 0x219D);
    y = MCU_memory[0x2197];
    return MCU_memory[0x219B];
}
// 00EB7A55 - 00EB7A6A
// Flash Sector[0x0006]写数据
void _00EB7A55(UINT8 addr, UINT8 data)
{
    if (MCU_memory[0x219F] == 0x01)
    {
        _00EB7A6B(addr, data);
    }
    else if (MCU_memory[0x219F] == 0x02)
    {
        _00EB7B31(addr, data);
    }
}
// 00EB7A6B - 00EB7B30
// Flash Sector[0x0006]写数据
UINT8 _00EB7A6B(UINT8 addr, UINT8 data)
{
    m_fls_errorcode = 0x01;
    // 备份0x09,0x0A,0x0B,0x0C,0x04的BANK映射
    fun_fls_savebank();
    PhysicalBankNumber = 0x0200;
    UINT8 x = 0x04;
    // BANK映射 0x09:0x0200, 0x0A:0x0201, 0x0B:0x0202, 0x0C:0x0203
    m_fun_changeDataBank(0x09, 0x04);
    m_fls_bank_4 = 0x0006;
    // BANK映射 0x04:0x0206
    fun_fls_SetBank4k_4();
    if (flash_emu_read(0x4000) != 0xFF)
    {
        // 备份Flash中的256字节
        for (UINT16 i = 0; i < 0x100; i++)
        {
            MCU_memory[0x2400 + i] = flash_emu_read(0x4000 + i);
        }
        MCU_memory[0x2400 + addr] = data;
        // 擦除bank4映射的4K数据
        flash_emu_write(jiami_9aaa, 0xAA);
        flash_emu_write(0x9555, 0x55);
        flash_emu_write(jiami_9aaa, 0x80);
        flash_emu_write(jiami_9aaa, 0xAA);
        flash_emu_write(0x9555, 0x55);
        flash_emu_write(0x4000, 0x30); // Sector-Erase
        MCU_memory[0x2193] = 0x00;
        MCU_memory[0x2194] = 0x00;
        while (flash_emu_read(0x4000) != 0xFF)
        {
            *(UINT16*)(MCU_memory + 0x2193) += 0x0001;
            if (MCU_memory[0x2194] < 0xFF)
            {
                continue;
            }
            m_fls_errorcode = 0x00;
            goto _8B2A;
        }
        for (UINT16 i = 0; i < 0x100; i++)
        {
            if (MCU_memory[0x2400 + i] != 0xFF)
            {
                // 进入Flash编程模式
                _00EB741C();
                flash_emu_write(0x4000 + i, MCU_memory[0x2400 + i]);
                // 等待Flash写入完成
                fun_fls_delay_buf();
            }
        }
        goto _8B2A;
    }
    else
    {
        _00EB741C();
        flash_emu_write(0x4000 + addr, data);
        fun_fls_delay_buf();
    }
_8B2A:
    // 恢复0x09,0x0A,0x0B,0x0C,0x04的bank映射
    _00EB54B2();
    return m_fls_errorcode;
}
// 00EB7B31 - 00EB7BE8
// Flash Sector[0x0006]写数据
UINT8 _00EB7B31(UINT8 addr, UINT8 data)
{
    m_fls_errorcode = 0x01;
    // 备份0x09,0x0A,0x0B,0x0C,0x04的BANK映射
    fun_fls_savebank();
    // BANK映射 0x09:0x0202, 0x0A:0x0203, 0x0B:0x0204, 0x0C:0x0205
    // BANK映射 0x04:0x0200
    fun_fls_SetBank16k();
    m_fls_bank_4 = 0x0006;
    // BANK映射 0x04:0x0206
    fun_fls_SetBank4k_4();
    if (flash_emu_read(0x4000) != 0xFF)
    {
        // 备份Flash中的256字节
        for (UINT16 i = 0; i < 0x100; i++)
        {
            MCU_memory[0x2400 + i] = flash_emu_read(0x4000 + i);
        }
        MCU_memory[0x2400 + addr] = data;
        // 擦除bank4映射的4K数据
        flash_emu_write(jiami_c555, 0xAA);
        flash_emu_write(jiami_9aaa, 0x55);
        flash_emu_write(jiami_c555, 0x80);
        flash_emu_write(jiami_c555, 0xAA);
        flash_emu_write(0x9555, 0x55);
        flash_emu_write(0x4000, 0x30); // Sector-Erase
        MCU_memory[0x2193] = 0x00;
        MCU_memory[0x2194] = 0x00;
        while (flash_emu_read(0x4000) != 0xFF)
        {
            *(UINT16*)(MCU_memory + 0x2193) += 0x0001;
            if (MCU_memory[0x2194] < 0xFF)
            {
                continue;
            }
            m_fls_errorcode = 0x00;
            goto _8BE2;
        }
        for (UINT16 i = 0; i < 0x100; i++)
        {
            if (MCU_memory[0x2400 + i] != 0xFF)
            {
                // 进入Flash编程模式
                _00EB741C();
                flash_emu_write(0x4000 + i, MCU_memory[0x2400 + i]);
                // 等待Flash写入完成
                fun_fls_delay_buf();
            }
        }
        goto _8BE2;
    }
    else
    {
        _00EB741C();
        flash_emu_write(0x4000 + addr, data);
        fun_fls_delay_buf();
    }
_8BE2:
    // 恢复0x09,0x0A,0x0B,0x0C,0x04的bank映射
    _00EB54B2();
    return m_fls_errorcode;
}
// 00EB7BE9 - 00EB7E41
void _00EB7BE9()
{
    U8 _A0DA[] = ""; // todo
    U8 _1746[0x80];
    SysLcdPartClear(0x00, 0x00, 0x9E, 0x5F);
    UINT8 _17CD = 0x00;
    SysOpenCom(0x00, 0x04, 0x00);
    SysPrintString(0x00, 0x20, _A0DA);
    UINT8 _17C9 = 0x41;
    UINT8 _17C8 = 0x00;
    while (0x01)
    {
    _8C9A:
        UINT32 _1742 = DictSysFlag & SYS_FLAG_COM_MASK;
        if (_1742 >= 0x00000001)
        {
        _8CE2:
            if (_1742 == 0x00000001)
            {
                UINT8 a = MCU_memory[0x8E];
            }
        _8CE7:
            UINT8 _17CC = 0x80;
            UINT8 _17CB = SysReadCom(_1746 + _17CD, &_17CC);
            _17CD += _17CC;
            if (_17CD == 0x0080)
            {
            _8D7A:
                SysWriteCom(0x01, &_17CB);
                UINT8 _17CD = 0x00;
                _17C8 += 0x01;
                if (_17C8 >= 0x0A)
                {
                _8DBC:
                    SysAscii(0x70, 0x20, _17C9);
                    _17C9 = (_17C9 + 0x01 - 0x41) % 0x1A + 0x41;
                    _17C8 = 0x00;
                }
            }
        }
    _8E05:
        if (SysGetKey() == KEY_EXIT)
        {
            break;
        }
    }
_8E26:
    SysCloseCom();
}

// 00EC8000 - 00EC8098
void _00EC8000(UINT8 _17CF)
{
    if (_17CF == 0x01)
    {
    _500F:
        SysIconScrollBarDownArrow(0x01);
        SysIconScrollBarUpArrow(0x00);
    }
    else if (_17CF == 0x0C)
    {
        _5038:
        SysIconScrollBarDownArrow(0x00);
        SysIconScrollBarUpArrow(0x01);
    }
    else
    {
        _5055:
        SysIconScrollBarDownArrow(0x01);
        SysIconScrollBarUpArrow(0x01);
    }
_506F:
    SysIconSetLeftScrollBar(_17CF * 0x08 + 0x02);
}

// 00EC8099 - 00EC8139
void _00EC8099(UINT16 _17D0, UINT8 _17D2, UINT8 _17D3)
{
    if (_17D3 == 0x01)
    {
    _50A5:
        SysIconLeftArrow(0x00);
        SysIconRightArrow(0x01);
    }
    else if (_17D3 == _00ECC0B6(_17D0, _17D2))
    {
        _5102:
        SysIconLeftArrow(0x01);
        SysIconRightArrow(0x00);
    }
    else
    {
        _511F:
        SysIconLeftArrow(0x01);
        SysIconRightArrow(0x01);
    }
}

// 00EC813A - 00ECA223
UINT8 _00EC813A(UINT8 _17CF)
{
    /*
    ████  █████                        █                                                              █
    █    █  █      █        ██████████                                                            █              █
    █  █    █      █        █      █                                                                      ██████████
    ██      █████        █      █                                                                    █        █
    █  █    █      █        █  ███████                                                          █          █
    █    █  █      █        █      █      █                                                              █████████
    █    █  █████        █      █      █                                                              █      █
    █    █  █      █        █      █      █                                                              █      █
    ███    █      █        █    █        █                                                          ████████████
    █        █      █      █    █          █                                                                      █
    █      █        █      █  █      █  █                                                                        █
    █    █        ██    █  █          █                                                                          █
    */
    U8 _93D5[] = { 0x3D,0xF0,0x00,0x80,0x00,0x00,0x00,0x80,0x00,0x25,0x10,0xFF,0xC0,0x00,0x00,0x00,0x80,0x80,0x29,0x10,0x88,0x00,0x00,0x00,0x00,0xFF,0xC0,0x31,0xF0,0x88,0x00,0x00,0x00,0x01,0x08,0x00,0x29,0x10,0xBF,0x80,0x00,0x00,0x02,0x08,0x00,0x25,0x10,0x88,0x80,0x00,0x00,0x00,0xFF,0x80,0x25,0xF0,0x88,0x80,0x00,0x00,0x00,0x88,0x00,0x25,0x10,0x88,0x80,0x00,0x00,0x00,0x88,0x00,0x39,0x10,0x90,0x80,0x00,0x00,0x03,0xFF,0xC0,0x21,0x11,0x20,0x80,0x00,0x00,0x00,0x08,0x00,0x22,0x11,0x45,0x00,0x00,0x00,0x00,0x08,0x00,0x24,0x32,0x82,0x00,0x00,0x00,0x00,0x08,0x00 };
    /*
            █
  ██████████
  █
  █  █    █  █
  █  █    █  █
  █  ██  ██  █
  ██    ██      █
  █  ███████
  █        █
█          █
█  █████████
    */
    U8 _9651[] = { 0x02,0x00,0x7F,0xE0,0x40,0x00,0x52,0x80,0x52,0x80,0x5B,0x40,0x66,0x20,0x5F,0xC0,0x42,0x00,0x82,0x00,0xBF,0xE0,0x00,0x00 };
    UINT8 _17C7;
    UINT8 _17C6;
    UINT8 _17C5;
    UINT8 _17B2 = 0x00;
    SysIconAllClear();
    SysIconUpArrow(0x01);
    SysIconDownArrow(0x01);
    UINT16 _17BF = Inityear;
    UINT8 _17BE = TimeLag;
    UINT8 _17C9 = 0x01;
    UINT8 _17B5 = 0x01;
    SysLcdPartClear(0x00, 0x00, 0x9E, 0x5F);
    UINT8 _17BB = SysGetHour();
    UINT8 _17BC = SysGetMinute();
    UINT8 _17BD = SysGetSecond();
    UINT16 _17C3;
    SysGetDay(&_17C3);
    UINT16 _17B3 = _17C3;
    if (_17C3 > _00ECC000(_17BF))
    {
    _528B:
        _17BF += 0x0001;
        if (_17BF > 0x0834)
        {
        _52CE:
            _17BF = 0x076D;
            _17C3 -= _00ECC000(0x0834);
        }
        else
        {
        _532D:
            _17C3 -= _00ECC000(_17BF - 0x0001);
        }
    _538E:
        SysSetDay(_17C3);
        Inityear = _17BF;
    }
_53CC:
    UINT8 _17C2 = _00ED1318(_17BF, _17C3);
    UINT8 _17C1 = _00ED146F(_17BF, _17C2, _17C3);
    _00EC8000(_17C2);
    _00EC8099(_17BF, _17C2, _17C1);
    UINT16 _17B0 = _17BF;
    UINT8 _17AF = _17C2;
    UINT8 _17AE = _17C1;
    UINT16 _17AC = _17BF;
    UINT8 _17AB = _17C2;
    UINT8 _17AA = _17C1;
    UINT8 _17A9;
    UINT16 _17B6 = _17BF;
    UINT8 _17B8 = _17C2;
    UINT8 _17B9 = _17C1;
    _00ED0000(_17BB, _17BE);
    _00ED0489(_17BC);
    _00ED053A(_17BD);
    SysPicture(0x03, 0x05, 0x44, 0x10, _93D5, 0x00);
    _00ECE2F5(_17BF, _17C2, _17C1, 0x00);
    _00ED1070(_17BF, _17C2, _17C1);
    _00ECEAAB(_17BF, _17C2, _17C1);
    _00ECE0F9(_17BF, _17C2, _17C1);
    _00EDF700(_17C2, _17C1);
    SysPicture(0x38, 0x52, 0x43, 0x5D, _9651, 0x00);
    UINT8 _17BA = _00ECC0B6(_17BF, _17C2);
    UINT8 _17C8 = _00ECC190(_17BF, _17C2, 0x01);
    SysLcdPartClear(0x48, 0x5C, 0x9D, 0x5E);
    _00F0009C(_17C8);
    _00ED20B0(_17C8, _17BA);
    _00ECE22D(_17C8, _17C1);
    _00EE4000();
    SysTimer1Open(0x0A);
    while (_17C9)
    {
    _57D9:
        GuiSetInputFilter(0x03);
        GuiSetKbdType(0x02);
        SysClearKeyBuffer();
        MsgType _17CA;
        if (GuiGetMsg(&_17CA) == 0x00)
        {
        _5833:
            continue;
        }
    _5836:
        if (_17CA.type == 0x01)
        {
        _5842:
            if (_17B2 + 0x01 == 0x01 && _17CA.param == 0x0013)
            {
            _586C:
                _17B2 += 0x01;
            }
            else if (_17B2 + 0x01 == 0x02 && _17CA.param == 0x001A)
            {
                _58A4:
                _17B2 += 0x01;
            }
        _58AF:
            if (_17B2 + 0x01 == 0x03 && _17CA.param == 0x0009)
            {
            _58D9:
                GuiHwSelfCheck();
                _17B2 = 0x00;
            }
        }
    _58EA:
        if (GuiTranslateMsg(&_17CA) == 0x00)
        {
        _591F:
            continue;
        }
    _5922:
        if (_17BE == 0x18)
        {
        _592E:
            SysLcdPartClear(0x3A, 0x1B, 0x44, 0x20);
        }
    _595A:
        if (_17CA.type == 0x0A && _17CA.param == 0x0003)
        {
        _5981:
            GuiPushMsg(&_17CA);
            SysTimer1Close();
            return 0xFD;
        }
    _59BC:
        if (_17CF + 0x01 == 0x01)
        {
        _59CB:
            if (_17CA.type == 0x08 && _17CA.param == 0x0001)
            {
            _59F2:
                GuiPushMsg(&_17CA);
                SysTimer1Close();
                return 0x01;
            }
        }
        _5A2D:
        if (0x0006 - _17CA.type)
        {
        _5A49:
            if (0x0005 - _17CA.type)
            {
            _7209:
                continue;
            }
            else
            {
            _6686:
                switch (_17CA.param)
                {
                case 0x0026: // _66B0
                    GuiHelp(0x0024);
                    break;
                case 0x0028: // _66D9
                    SysTimer1Close();
                    _17C9 = 0x00;
                    break;
                case 0x0027: // _66ED
                    if (_17CF + 0x01 == 0x01)
                    {
                    _66FC:
                        SysTimer1Close();
                        _17C9 = 0x00;
                    }
                    break;
                case 0x0020: // _6710
                    if (_17BF == 0x0834)
                    {
                    _672B:
                        _17BF = 0x076D;
                    }
                    else
                    {
                    _6739:
                        _17BF += 0x0001;
                        UINT16 _17CD = _17BF - 0x0001;
                        if (_17C1 == _00ECC0B6(_17CD, _17C2))
                        {
                        _67BF:
                            _17C1 = _00ECC0B6(_17BF, _17C2);
                        }
                    }
                    break;
                case 0x0021: // _67F8
                    if (_17BF == 0x076D)
                    {
                        _6813:
                        _17BF = 0x0834;
                    }
                    else
                    {
                        _6821:
                        _17BF -= 0x0001;
                        UINT16 _17CD = _17BF + 0x0001;
                        if (_17C1 == _00ECC0B6(_17CD, _17C2))
                        {
                        _68A7:
                            _17C1 = _00ECC0B6(_17BF, _17C2);
                        }
                    }
                    break;
                case 0x0022: // _68E0
                    if (_17C2 == 0x0C)
                    {
                    _68EC:
                        _17C2 = 0x01;
                    }
                    else
                    {
                    _68F5:
                        _17C2 += 0x01;
                        if (_17C1 > _00ECC0B6(_17BF, _17C2))
                        {
                        _6945:
                            _17C1 = _00ECC0B6(_17BF, _17C2);
                        }
                    }
                    break;
                case 0x0023: // _697E
                    if (_17C2 > 0x01)
                    {
                    _698F:
                        _17C2 -= 0x01;
                        if (_17C1 > _00ECC0B6(_17BF, _17C2))
                        {
                        _69DF:
                            _17C1 = _00ECC0B6(_17BF, _17C2);
                        }
                    }
                    else
                    {
                    _6A18:
                        if (_17C2 == 0x01)
                        {
                        _6A24:
                            _17C2 = 0x0C;
                        }
                    }
                    break;
                case 0x0024: // _6A2D
                    _17C8 = _00ECC190(_17BF, _17C2, 0x01);
                    _00ECE22D(_17C8, _17C1);
                    if (MCU_memory[0x1819] > 0x4A)
                    {
                    _6A9E:
                        if (_17C1 == 0x01)
                        {
                        _6AAA:
                            _17C7 = _00ECC0B6(_17BF, _17C2);
                            _17C6 = (_17C7 + _17C8 - 0x01) % 0x07;
                            _17C5 = (_17C7 + _17C8 - 0x01) / 0x07;
                            if (_17C5 == 0x05)
                            {
                            _6B1E:
                                _17C5 = 0x00;
                            }
                        _6B24:
                            MCU_memory[0x1819] = _17C6 * 0x0C + 0x4A;
                            MCU_memory[0x181A] = _17C5 * 0x0D + 0x1E;
                            _17C1 = _00ECC0B6(_17BF, _17C2);
                        }
                        else
                        {
                        _6B7F:
                            MCU_memory[0x1819] -= 0x0C;
                            MCU_memory[0x181A] = MCU_memory[0x181A];
                            _17C1 -= 0x01;
                        }
                    }
                    else if (MCU_memory[0x1819] == 0x4A)
                    {
                    _6BA7:
                        if (MCU_memory[0x181A] != 0x1E)
                        {
                        _6BB2:
                            MCU_memory[0x1819] = 0x92;
                            MCU_memory[0x181A] -= 0x0D;
                            _17C1 -= 0x01;
                        }
                        else
                        {
                        _6BCE:
                            if (_17C1 == 0x01)
                            {
                            _6BDA:
                                _17C7 = _00ECC0B6(_17BF, _17C2);
                                _17C6 = (_17C7 + _17C8 - 0x01) % 0x07;
                                _17C5 = (_17C7 + _17C8 - 0x01) / 0x07;
                                if (_17C5 == 0x05)
                                {
                                _6C4E:
                                    _17C5 = 0x00;
                                }
                            _6C54:
                                MCU_memory[0x1819] = _17C6 * 0x0C + 0x4A;
                                MCU_memory[0x181A] = _17C5 * 0x0D + 0x1E;
                                _17C1 = _00ECC0B6(_17BF, _17C2);
                            }
                            else
                            {
                            _6CAF:
                                MCU_memory[0x1819] = 0x92;
                                MCU_memory[0x181A] = 0x52;
                                _17C1 -= 0x01;
                            }
                        }
                    }
                _6CC4:
                    _17C8 = _00ECC190(_17BF, _17C2, 0x01);
                    _00ECE22D(_17C8, _17C1);
                    break;
                case 0x0025: // _6D28
                    _17C8 = _00ECC190(_17BF, _17C2, 0x01);
                    _00ECE22D(_17C8, _17C1);
                    if (MCU_memory[0x1819] < 0x0092)
                    {
                    _6DA2:
                        if (_17C1 == _00ECC0B6(_17BF, _17C2))
                        {
                            _6DE2:
                            MCU_memory[0x1819] = _17C8 * 0x0C + 0x4A;
                            MCU_memory[0x181A] = 0x1E;
                            _17C1 = 0x01;
                        }
                        else
                        {
                        _6E01:
                            MCU_memory[0x1819] += 0x0C;
                            MCU_memory[0x181A] = MCU_memory[0x181A];
                            _17C1 += 0x01;
                        }
                    }
                    else if (MCU_memory[0x1819] == 0x0092)
                    {
                    _6E37:
                        if (_17C1 == _00ECC0B6(_17BF, _17C2))
                        {
                            _6E77:
                            MCU_memory[0x1819] = _17C8 * 0x0C + 0x4A;
                            MCU_memory[0x181A] = 0x1E;
                            _17C1 = 0x01;
                        }
                        else
                        {
                        _6E96:
                            if (MCU_memory[0x181A] != 0x52)
                            {
                                _6EA1:
                                MCU_memory[0x1819] = 0x4A;
                                MCU_memory[0x181A] += 0x0D;
                                _17C1 += 0x01;
                            }
                            else
                            {
                                _6EBD:
                                if (_17C1 == _00ECC0B6(_17BF, _17C2))
                                {
                                _6EFD:
                                    MCU_memory[0x1819] = _17C8 * 0x0C + 0x4A;
                                    MCU_memory[0x181A] = 0x1E;
                                    _17C1 = 0x01;
                                }
                                else
                                {
                                _6F1C:
                                    MCU_memory[0x1819] = 0x4A;
                                    MCU_memory[0x181A] = 0x1E;
                                    _17C1 += 0x01;
                                }
                            }
                        }
                    }
                    _6F31:
                    _17C8 = _00ECC190(_17BF, _17C2, 0x01);
                    _00ECE22D(_17C8, _17C1);
                    break;
                }
            _6F95:
                _00EC8000(_17C2);
                _00EC8099(_17BF, _17C2, _17C1);
                _17BA = _00ECC0B6(_17BF, _17C2);
                _17C8 = _00ECC190(_17BF, _17C2, 0x01);
                _00ECEAAB(_17BF, _17C2, _17C1);
                _00ED1070(_17BF, _17C2, _17C1);
                _00ECE2F5(_17BF, _17C2, _17C1, 0x00);
                _00ECE0F9(_17BF, _17C2, _17C1);
                _00EDF700(_17C2, _17C1);
                if (_17B6 != _17BF || _17C2 != _17B8)
                {
                _716F:
                    _00F0009C(_17C8);
                    _00ED20B0(_17C8, _17BA);
                    _00ECE22D(_17C8, _17C1);
                    MCU_memory[0x1819] = _17C8 * 0x0C + 0x4A;
                    MCU_memory[0x181A] = 0x1E;
                }
            _71E0:
                _17B6 = _17BF;
                _17B8 = _17C2;
                _17B9 = _17C1;
            }
        }
        else
        {
        _5A5E:
            if (_17BB + 0x01 != 0x01 || _17BC + 0x01 != 0x01 || _17BD + 0x01 != 0x01)
            {
            _5A8B:
                _17B5 = 0x01;
            }
        _5A91:
            SysGetDay(&_17C3);
            if (_17B3 != _17C3 &&_17B5 == 0x01)
            {
            _5AE6:
                if (_17C3 == 0x0001 || _17C3 > _00ECC000(_17B0))
                {
                _5B4A:
                    _17B0 += 0x0001;
                    if (_17B0 > 0x0834)
                    {
                    _5B8D:
                        _17B0 = 0x076D;
                    }
                _5B98:
                    _17C3 = 0x0001;
                    SysSetDay(_17C3);
                }
            _5BCC:
                _17AF = _00ED1318(_17B0, _17C3);
                _17AE = _00ED146F(_17B0, _17AF, _17C3);
                if (_17B0 != _17BF || _17AF != _17C2)
                {
                _5C79:
                    if (_17AE != _17C1)
                    {
                    _5C8A:
                        _17A9 = _00ECC190(_17BF, _17C2, 0x01);
                        _00ECE22D(_17A9, _17C1);
                    }
                }
            _5CEB:
                _17BA = _00ECC0B6(_17B0, _17AF);
                _17A9 = _00ECC190(_17B0, _17AF, 0x01);
                _00ECEAAB(_17B0, _17AF, _17AE);
                if (_17B0 != _17BF || _17AF != _17C2 || _17AE != _17C1)
                {
                _5DCD:
                    _17A9 = _00ECC190(_17B0, _17AF, 0x01);
                    _00F0009C(_17A9);
                    _00ED20B0(_17A9, _17BA);
                    _00ECE22D(_17A9, _17AE);
                    MCU_memory[0x1819] = _17A9 * 0x0C;
                    MCU_memory[0x181A] = 0x1E;
                    _17B5 = 0x02;
                }
            _5E7F:
                _00ED1070(_17B0, _17AF, _17AE);
                _00ECE2F5(_17B0, _17AF, _17AE, 0x00);
                _00ECE0F9(_17B0, _17AF, _17AE);
                _00EDF700(_17AF, _17AE);
                if (_17B0 - _17AC == 0x0001 || _17AC - _17B0 == 0x00C7)
                {
                _5FA5:
                    Inityear = _17B0;
                }
            _5FBA:
                _17AC = _17B0;
                _17AB = _17AF;
                _17AA = _17AE;
                _17BF = _17B0;
                _17C2 = _17AF;
                _17C1 = _17AE;
                _17B6 = _17B0;
                _17B8 = _17AF;
                _17B9 = _17AE;
                _00EC8000(_17AF);
                _00EC8099(_17B0, _17AF, _17AE);
                _17B3 = _17C3;
            }
        _6078:
            _17BD = SysGetSecond();
            _00ED053A(_17BD);
            if (_17BD + 0x01 == 0x01)
            {
            _60A5:
                _17BC = SysGetMinute();
                if (_17BC + 0x01 == 0x01)
                {
                _60C3:
                    _17BB = SysGetHour();
                    if (_17BB + 0x01 == 0x01)
                    {
                        _60E1:
                        if (_17B5 == 0x01)
                        {
                        _60ED:
                            SysGetDay(&_17C3);
                            if (_17C3 > _00ECC000(_17AC))
                            {
                            _6161:
                                _17B0 += 0x0001;
                                if (_17B0 > 0x0834)
                                {
                                _61A4:
                                    _17B0 = 0x076D;
                                }
                                else
                                {
                                _61AF:
                                    _17C3 = 0x0001;
                                    SysSetDay(_17C3);
                                }
                            }
                        _61E3:
                            _17AF = _00ED1318(_17B0, _17C3);
                            _17AE = _00ED146F(_17B0, _17AF, _17C3);
                            if (_17B0 != _17BF || _17AF != _17C2)
                            {
                            _6290:
                                if (_17AE != _17C1)
                                {
                                _62A1:
                                    _17A9 = _00ECC190(_17BF, _17C2, 0x01);
                                    _00ECE22D(_17A9, _17C1);
                                }
                            }
                        _6302:
                            _17BA = _00ECC0B6(_17B0, _17AF);
                            _17A9 = _00ECC190(_17B0, _17AF, 0x01);
                            if (_17B0 != _17BF || _17AF != _17C2)
                            {
                            _639F:
                                _00F0009C(_17A9);
                                _00ED20B0(_17A9, _17BA);
                                _00ECE22D(_17A9, _17AE);
                                MCU_memory[0x1819] = _17A9 * 0x0C + 0x4A;
                                MCU_memory[0x181A] = 0x1E;
                                _17B5 = 0x02;
                            }
                        _6416:
                            _00ECEAAB(_17B0, _17AF, _17AE);
                            _00ED1070(_17B0, _17AF, _17AE);
                            _00ECE2F5(_17B0, _17AF, _17AE, 0x00);
                            _00ECE0F9(_17B0, _17AF, _17AE);
                            _00EDF700(_17AF, _17AE);
                            if (_17B0 - _17AC == 0x0001 || _17AC - _17B0 == 0x00C7)
                            {
                            _6573:
                                Inityear = _17B0;
                            }
                        _6588:
                            _17AC = _17B0;
                            _17AB = _17AF;
                            _17AA = _17AE;
                            _17BF = _17B0;
                            _17C2 = _17AF;
                            _17C1 = _17AE;
                            _17B6 = _17B0;
                            _17B8 = _17AF;
                            _17B9 = _17AE;
                            _00EC8000(_17AF);
                            _00EC8099(_17B0, _17AF, _17AE);
                        }
                    }
                }
            }
        _6630:
            _17BB = SysGetHour();
            _00ED0000(_17BB, _17BE);
            _17BC = SysGetMinute();
            _00ED0489(_17BC);
        }
    }
_720C:
    return 0x01;
}




// 00ECC000 - 00ECC0B5
// 返回某年有多少天
UINT16 _00ECC000(UINT16 year)
{
    if ((((year % 4) == 0x0000) && ((year % 100) != 0x0000))
        || ((year % 400) == 0x0000))
    {
        return 366;
    }
    return 365;
}

// 00ECC0B6 - 00ECC18F
// 返回某年某月有多少天
UINT8 _00ECC0B6(UINT16 year, UINT8 month)
{
    if (month == 0x02)
    {
        if ((((year % 0x0004) == 0x0000) && ((year % 100) != 0x0000))
            || ((year % 400) == 0x0000))
        {
            return 29;
        }
        return 28;
    }
    UINT8 days[12] = { 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 };
    return days[month - 0x01];
}

// 00ECC190 - 00ECC289
UINT8 _00ECC190(UINT16 _17D0, UINT8 _17D2, UINT8 _17D3)
{
    UINT8 _8E49[] = { 0x02,0x03,0x04,0x05,0x07,0x01,0x02,0x03,0x05,0x06,0x07 };
    UINT16 _17CE = _00ECC28A(_17D0, _17D2, _17D3);
    UINT8 _17CB = _17CE % 0x0007;
    UINT8 _17CD = _8E49[_17D0 - 1901];
    UINT8 _17CC = _17CD + _17CB;
    if (_17CC > 0x07)
    {
    _5249:
        _17CC -= 0x08;
    }
    else if (_17CC <= 0x07)
    {
        _5265:
        _17CC -= 0x01;
    }
_5270:
    return _17CC;
}

// 00ECC28A - 00ECC36E
// 返回某年某月某日是当年的第多少天
UINT16 _00ECC28A(UINT16 year, UINT8 month, UINT8 day)
{
    UINT16 _17C1 = 0x0000;
    for (UINT8 _17C0 = 0x01; _17C0 <= month - 0x01; _17C0++)
    {
        UINT8 _17BF = _00ECC0B6(year, _17C0);
        _17C1 += _17BF;
    }
    return _17C1 + day;
}

// 00ECC36F - 00ECC545
UINT8 _00ECC36F(UINT8 _17CF, UINT8 _17D0)
{
    UINT8 _17CE = 0x00;
    switch (_17CF)
    {
    case 0x0001: // _53A9
        if (_17D0 <= 0x13)
        {
        _53B7:
            _17CE = 0x0C;
        }
        else
        {
        _53C0:
            _17CE = 0x01;
        }
        break;
    case 0x0002: // _53C9
        if (_17D0 <= 0x12)
        {
        _53D7:
            _17CE = 0x01;
        }
        else
        {
        _53E0:
            _17CE = 0x02;
        }
        break;
    case 0x0003: // _53E9
        if (_17D0 <= 0x14)
        {
        _53F7:
            _17CE = 0x02;
        }
        else
        {
        _5400:
            _17CE = 0x03;
        }
        break;
    case 0x0004: // _5409
        if (_17D0 <= 0x13)
        {
        _5417:
            _17CE = 0x03;
        }
        else
        {
        _5420:
            _17CE = 0x04;
        }
        break;
    case 0x0005: // _5429
        if (_17D0 <= 0x14)
        {
        _5437:
            _17CE = 0x04;
        }
        else
        {
        _5440:
            _17CE = 0x05;
        }
        break;
    case 0x0006: // _5449
        if (_17D0 <= 0x15)
        {
        _5457:
            _17CE = 0x05;
        }
        else
        {
        _5460:
            _17CE = 0x06;
        }
        break;
    case 0x0007: // _5469
        if (_17D0 <= 0x16)
        {
        _5477:
            _17CE = 0x06;
        }
        else
        {
        _5480:
            _17CE = 0x07;
        }
        break;
    case 0x0008: // _5489
        if (_17D0 <= 0x16)
        {
        _5497:
            _17CE = 0x07;
        }
        else
        {
        _54A0:
            _17CE = 0x08;
        }
        break;
    case 0x0009: // _54A9
        if (_17D0 <= 0x16)
        {
        _54B7:
            _17CE = 0x08;
        }
        else
        {
        _54C0:
            _17CE = 0x09;
        }
        break;
    case 0x000A: // _54C9
        if (_17D0 <= 0x16)
        {
        _54D7:
            _17CE = 0x09;
        }
        else
        {
        _54E0:
            _17CE = 0x0A;
        }
        break;
    case 0x000B: // _54E9
        if (_17D0 <= 0x15)
        {
        _54F7:
            _17CE = 0x0A;
        }
        else
        {
        _5500:
            _17CE = 0x0B;
        }
        break;
    case 0x000C: // _5509
        if (_17D0 <= 0x15)
        {
        _5517:
            _17CE = 0x0B;
        }
        else
        {
        _5520:
            _17CE = 0x0C;
        }
        break;
    }
_5529:
    return _17CE - 0x01;
}

// 00ECC546 - 00ECD75C
UINT8 _00ECC546(UINT16 _17D0, UINT16 _17D2)
{
    UINT8 _17CF;
    *(UINT16*)(MCU_memory + 0x1801) = _00ECDBE5(_17D0, 0x01);
    *(UINT16*)(MCU_memory + 0x1803) = _00ECDBE5(_17D0, 0x02);
    *(UINT16*)(MCU_memory + 0x1805) = _00ECDBE5(_17D0, 0x03);
    *(UINT16*)(MCU_memory + 0x1807) = _00ECDBE5(_17D0, 0x04);
    *(UINT16*)(MCU_memory + 0x1809) = _00ECDBE5(_17D0, 0x05);
    *(UINT16*)(MCU_memory + 0x180B) = _00ECDBE5(_17D0, 0x06);
    *(UINT16*)(MCU_memory + 0x180D) = _00ECDBE5(_17D0, 0x07);
    *(UINT16*)(MCU_memory + 0x180F) = _00ECDBE5(_17D0, 0x08);
    *(UINT16*)(MCU_memory + 0x1811) = _00ECDBE5(_17D0, 0x09);
    *(UINT16*)(MCU_memory + 0x1813) = _00ECDBE5(_17D0, 0x0A);
    *(UINT16*)(MCU_memory + 0x1815) = _00ECDBE5(_17D0, 0x0B);
    *(UINT16*)(MCU_memory + 0x1817) = _00ECDBE5(_17D0, 0x0C);
    UINT8 _17CE = _00ECDE7F(_17D0);
    UINT8 _17CD = _00ECDEF0(_17D0);
    switch (_17CE)
    {
    case 0x0002: // _5875
        if (_17D2 > *(UINT16*)(MCU_memory + 0x1803) && _17D2 <= _17CD + *(UINT16*)(MCU_memory + 0x1803))
        {
        _58D5:
            _17CF = _17CE + 0x0C;
        }
        else if (_17D2 <= *(UINT16*)(MCU_memory + 0x1803))
        {
        _5902:
            _17CF = _00ECD75D(_17D0, _17D2);
        }
        else if (_17D2 > _17CD + *(UINT16*)(MCU_memory + 0x1803))
        {
        _5983:
            _17D2 -= _17CD;
            _17CF = _00ECD75D(_17D0, _17D2);
        }
        break;
    case 0x0003: // _59F0
        if (_17D2 > *(UINT16*)(MCU_memory + 0x1805) && _17D2 <= _17CD + *(UINT16*)(MCU_memory + 0x1805))
        {
        _5A50:
            _17CF = _17CE + 0x0C;
        }
        else if (_17D2 <= *(UINT16*)(MCU_memory + 0x1805))
        {
        _5A7D:
            _17CF = _00ECD75D(_17D0, _17D2);
        }
        else if (_17D2 > _17CD + *(UINT16*)(MCU_memory + 0x1805))
        {
        _5AFE:
            _17D2 -= _17CD;
            _17CF = _00ECD75D(_17D0, _17D2);
        }
        break;
    case 0x0004: // _5B6B
        if (_17D2 > *(UINT16*)(MCU_memory + 0x1807) && _17D2 <= _17CD + *(UINT16*)(MCU_memory + 0x1807))
        {
        _5BCB:
            _17CF = _17CE + 0x0C;
        }
        else if (_17D2 <= *(UINT16*)(MCU_memory + 0x1807))
        {
        _5BF8:
            _17CF = _00ECD75D(_17D0, _17D2);
        }
        else if (_17D2 > _17CD + *(UINT16*)(MCU_memory + 0x1807))
        {
        _5C79:
            _17D2 -= _17CD;
            _17CF = _00ECD75D(_17D0, _17D2);
        }
        break;
    case 0x0005: // _5CE6
        if (_17D2 > *(UINT16*)(MCU_memory + 0x1809) && _17D2 <= _17CD + *(UINT16*)(MCU_memory + 0x1809))
        {
        _5D46:
            _17CF = _17CE + 0x0C;
        }
        else if (_17D2 <= *(UINT16*)(MCU_memory + 0x1809))
        {
        _5D73:
            _17CF = _00ECD75D(_17D0, _17D2);
        }
        else if (_17D2 > _17CD + *(UINT16*)(MCU_memory + 0x1809))
        {
        _5DF4:
            _17D2 -= _17CD;
            _17CF = _00ECD75D(_17D0, _17D2);
        }
        break;
    case 0x0006: // _5E61
        if (_17D2 > *(UINT16*)(MCU_memory + 0x180B) && _17D2 <= _17CD + *(UINT16*)(MCU_memory + 0x180B))
        {
        _5EC1:
            _17CF = _17CE + 0x0C;
        }
        else if (_17D2 <= *(UINT16*)(MCU_memory + 0x180B))
        {
        _5EEE:
            _17CF = _00ECD75D(_17D0, _17D2);
        }
        else if (_17D2 > _17CD + *(UINT16*)(MCU_memory + 0x180B))
        {
        _5F6F:
            _17D2 -= _17CD;
            _17CF = _00ECD75D(_17D0, _17D2);
        }
        break;
    case 0x0007: // _5FDC
        if (_17D2 > *(UINT16*)(MCU_memory + 0x180D) && _17D2 <= _17CD + *(UINT16*)(MCU_memory + 0x180D))
        {
        _603C:
            _17CF = _17CE + 0x0C;
        }
        else if (_17D2 <= *(UINT16*)(MCU_memory + 0x180D))
        {
        _6069:
            _17CF = _00ECD75D(_17D0, _17D2);
        }
        else if (_17D2 > _17CD + *(UINT16*)(MCU_memory + 0x180D))
        {
        _60EA:
            _17D2 -= _17CD;
            _17CF = _00ECD75D(_17D0, _17D2);
        }
        break;
    case 0x0008: // _6157
        if (_17D2 > *(UINT16*)(MCU_memory + 0x180F) && _17D2 <= _17CD + *(UINT16*)(MCU_memory + 0x180F))
        {
        _61B7:
            _17CF = _17CE + 0x0C;
        }
        else if (_17D2 <= *(UINT16*)(MCU_memory + 0x180F))
        {
        _61E4:
            _17CF = _00ECD75D(_17D0, _17D2);
        }
        else if (_17D2 > _17CD + *(UINT16*)(MCU_memory + 0x180F))
        {
        _6265:
            _17D2 -= _17CD;
            _17CF = _00ECD75D(_17D0, _17D2);
        }
        break;
    case 0x0009: // _62D2
        if (_17D2 > *(UINT16*)(MCU_memory + 0x1811) && _17D2 <= _17CD + *(UINT16*)(MCU_memory + 0x1811))
        {
        _6332:
            _17CF = _17CE + 0x0C;
        }
        else if (_17D2 <= *(UINT16*)(MCU_memory + 0x1811))
        {
        _635F:
            _17CF = _00ECD75D(_17D0, _17D2);
        }
        else if (_17D2 > _17CD + *(UINT16*)(MCU_memory + 0x1811))
        {
        _63E0:
            _17D2 -= _17CD;
            _17CF = _00ECD75D(_17D0, _17D2);
        }
        break;
    case 0x000A: // _644D
        if (_17D2 > *(UINT16*)(MCU_memory + 0x1813) && _17D2 <= _17CD + *(UINT16*)(MCU_memory + 0x1813))
        {
        _64AD:
            _17CF = _17CE + 0x0C;
        }
        else if (_17D2 <= *(UINT16*)(MCU_memory + 0x1813))
        {
        _64DA:
            _17CF = _00ECD75D(_17D0, _17D2);
        }
        else if (_17D2 > _17CD + *(UINT16*)(MCU_memory + 0x1813))
        {
        _655B:
            _17D2 -= _17CD;
            _17CF = _00ECD75D(_17D0, _17D2);
        }
        break;
    case 0x000B: // _65C8
        if (_17D2 > *(UINT16*)(MCU_memory + 0x1815) && _17D2 <= _17CD + *(UINT16*)(MCU_memory + 0x1815))
        {
        _6628:
            _17CF = _17CE + 0x0C;
        }
        else if (_17D2 <= *(UINT16*)(MCU_memory + 0x1815))
        {
        _6655:
            _17CF = _00ECD75D(_17D0, _17D2);
        }
        else if (_17D2 > _17CD + *(UINT16*)(MCU_memory + 0x1815))
        {
        _66D6:
            _17D2 -= _17CD;
            _17CF = _00ECD75D(_17D0, _17D2);
        }
        break;
    }
_6743:
    return _17CF;
}

// 00ECD75D - 00ECDBE4
UINT8 _00ECD75D(UINT16 _17D0, UINT16 _17D2)
{
    UINT8 _17CF;
    *(UINT16*)(MCU_memory + 0x1801) = _00ECDBE5(_17D0, 0x01);
    *(UINT16*)(MCU_memory + 0x1803) = _00ECDBE5(_17D0, 0x02);
    *(UINT16*)(MCU_memory + 0x1805) = _00ECDBE5(_17D0, 0x03);
    *(UINT16*)(MCU_memory + 0x1807) = _00ECDBE5(_17D0, 0x04);
    *(UINT16*)(MCU_memory + 0x1809) = _00ECDBE5(_17D0, 0x05);
    *(UINT16*)(MCU_memory + 0x180B) = _00ECDBE5(_17D0, 0x06);
    *(UINT16*)(MCU_memory + 0x180D) = _00ECDBE5(_17D0, 0x07);
    *(UINT16*)(MCU_memory + 0x180F) = _00ECDBE5(_17D0, 0x08);
    *(UINT16*)(MCU_memory + 0x1811) = _00ECDBE5(_17D0, 0x09);
    *(UINT16*)(MCU_memory + 0x1813) = _00ECDBE5(_17D0, 0x0A);
    *(UINT16*)(MCU_memory + 0x1815) = _00ECDBE5(_17D0, 0x0B);
    *(UINT16*)(MCU_memory + 0x1817) = _00ECDBE5(_17D0, 0x0C);
    if (_17D2 <= *(UINT16*)(MCU_memory + 0x180B))
    {
    _6A2C:
        if (_17D2 <= *(UINT16*)(MCU_memory + 0x1805))
        {
        _6A4B:
            if (_17D2 <= *(UINT16*)(MCU_memory + 0x1803))
            {
            _6A6A:
                if (_17D2 <= *(UINT16*)(MCU_memory + 0x1801))
                {
                _6A89:
                    _17CF = 0x01;
                }
                else
                {
                _6A92:
                    _17CF = 0x02;
                }
            }
            else
            {
            _6A9B:
                _17CF = 0x03;
            }
        }
        else
        {
            _6AA4:
            if (_17D2 <= *(UINT16*)(MCU_memory + 0x1809))
            {
                _6AC3:
                if (_17D2 <= *(UINT16*)(MCU_memory + 0x1807))
                {
                    _6AE2:
                    _17CF = 0x04;
                }
                else
                {
                    _6AEB:
                    _17CF = 0x05;
                }
            }
            else
            {
                _6AF4:
                _17CF = 0x06;
            }
        }
    }
    else
    {
        _6AFD:
        if (_17D2 <= *(UINT16*)(MCU_memory + 0x1811))
        {
        _6B1C:
            if (_17D2 <= *(UINT16*)(MCU_memory + 0x180F))
            {
            _6B3B:
                if (_17D2 <= *(UINT16*)(MCU_memory + 0x180D))
                {
                    _6B5A:
                    _17CF = 0x07;
                }
                else
                {
                    _6B63:
                    _17CF = 0x08;
                }
            }
            else
            {
                _6B6C:
                _17CF = 0x09;
            }
        }
        else
        {
            _6B75:
            if (_17D2 <= *(UINT16*)(MCU_memory + 0x1815))
            {
                _6B94:
                if (_17D2 <= *(UINT16*)(MCU_memory + 0x1813))
                {
                    _6BB3:
                    _17CF = 0x0A;
                }
                else
                {
                    _6BBC:
                    _17CF = 0x0B;
                }
            }
            else
            {
                _6BC5:
                _17CF = 0x0C;
            }
        }
    }
    return _17CF;
}

// 00ECDBE5 - 00ECDD0D
UINT16 _00ECDBE5(UINT16 _17D0, UINT8 _17D2)
{
    UINT32 _90B1[0x10]; // todo
    UINT32 _17CC;
    UINT16 _17C8 = 0x0000;
    UINT8 _17CA = 0x00;
    for (UINT8 _17CB = 0x01; _17CB <= _17D2; _17CB++)
    {
    _6C2B:
        _17CC = _90B1[_17D0 - 0x076C];
        _17CA = ((0x00010000 >> _17CB) & _17CC) ? 0x1E : 0x1D;
        _17C8 += _17CA;
    }
_6CED:
    return _17C8;
}

// 00ECDD0E - 00ECDE7E
UINT16 _00ECDD0E(UINT16 _17D0)
{
    UINT32 _90B1[0x10]; // todo
    UINT16 _17CC;
    UINT16 _17CA = 0x015C;
    for (UINT16 _17CE = 0x8000; _17CE > 0x0008; _17CE >>= 0x0001)
    {
    _6D7B:
        _17CA += (_17CE & _90B1[_17D0 - 0x076C]) ? 0x0001 : 0x0000;
        _17CC = _00ECDEF0(_17D0) + _17CA; // 怀疑_17CC的使用上有bug
    }
_6E5E:
    return _17CC;
}

// 00ECDE7F - 00ECDEEF
UINT8 _00ECDE7F(UINT16 _17D0)
{
    UINT32 _90B1[0x10]; // todo
    UINT8 _17CF = _90B1[_17D0 - 0x076C] & 0x0000000F;
    return  _17CF;
}

// 00ECDEF0 - 00ECDFB5
UINT8 _00ECDEF0(UINT16 _17D0)
{
    UINT32 _90B1[0x10]; // todo
    if (_00ECDE7F(_17D0))
    {
    _6F33:
        UINT8 _17CF = (_90B1[_17D0 - 0x076C] & 0x00010000) ? 0x1E : 0x1D;
        return _17CF;
    }
    else
    {
    _6F9E:
        return 0x00;
    }
}

// 00ECDFB6 - 00ECE0F8
void _00ECDFB6(UINT8 _17CF, UINT8 _17D0, UINT8 _17D1)
{
    UINT8 _9732[0x120]; // todo
    UINT8 _9852[0x120]; // todo
    SysPicture(_17CF, _17D0, _17CF + 0x0B, _17D0 + 0x0B, 0x0018 * _17D1 + _9732, 0x00);
    SysPicture(_17CF, _17D0 + 0x0D, _17CF + 0x0B, _17D0 + 0x18, 0x0018 * _17D1 + _9852, 0x00);
}

// 00ECE0F9 - 00ECE22C
void _00ECE0F9(UINT16 _17D0, UINT8 _17D2, UINT8 _17D3)
{
    UINT8 _9669[100];
    UINT16 _17CD = _00ECC28A(_17D0, _17D2, _17D3);
    UINT16 _17CB = _17CD - _9669[_17D0 - 0x076C];
    if (_17CB == 0x0000) // todo 判断条件看不明白
    {
    _71C1:
        _17D0 -= 0x0001;
    }
    _71E4:
    UINT8 _17CF = (_17D0 - 0x0748) % 0x000C;
    _00ECEF4B(_17CF);
}

// 00ECE22D - 00ECE2F4
void _00ECE22D(UINT8 _17CF, UINT8 _17D0)
{
    UINT8 _17CD = (_17D0 + _17CF - 0x01) % 0x07;
    UINT8 _17CC = (_17D0 + _17CF - 0x01) / 0x07;
    if (_17CC == 0x05)
    {
    _727E:
        _17CC = 0x00;
    }
_7284:
    MCU_memory[0x1819] = _17CD * 0x0C + 0x4A;
    MCU_memory[0x181A] = _17CC * 0x0D + 0x1E;
    UINT8 _17CE = MCU_memory[0x1819] + 0x0A;
    SysLcdReverse(0x56, 0x45, _17CE, MCU_memory[0x181A] + 0x0A);
}

// 00ECE2F5 - 00ECEAAA
void _00ECE2F5(UINT16 _17D0, UINT8 _17D2, UINT8 _17D3, UINT8 _17D4)
{
    UINT8 _9669[100]; // todo
    UINT8 _17CD;
    UINT8 _17CC;
    UINT16 _17CA = _00ECC28A(_17D0, _17D2, _17D3);
    UINT16 _17CE = _17CA - _9669[_17D0 - 0x076C];
    if (_17CE + 0x0001 != 0x0001 && _17CE < 0x80) // todo 判断条件看不明白
    {
    _73CD:
        _17D0 = _17D0;
        _17CE = _17CE;
        _00ED158B(_17D0);
        _00ECEE91(_17D0);
        UINT8 _17C9 = _00ECDE7F(_17D0);
        UINT8 _17C8 = _00ECDEF0(_17D0);
        if (_17C9 + 0x01 == 0x01)
        {
        _74B8:
            _17CD = _00ECD75D(_17D0, _17CE);
            _17CC = _00ED0FDF(_17D0, _17CE, _17CD);
            if (_17D4 + 0x01 == 0x01)
            {
            _7548:
                _00ED05EB(_17CC);
                _00ED0B7D(_17CD);
            }
        }
        else
        {
        _7569:
            _17CD = _00ECC546(_17D0, _17CE);
            _17CC = _00ED0DB1(_17D0, _17CE, _17CD);
            if (_17CE > _00ECDBE5(_17D0, _17C9) && _17CE <= _17C8 + _00ECDBE5(_17D0, _17C9))
            {
                _76A6:
                if (_17D4 + 0x01 == 0x01)
                {
                _76B5:
                    _00ED0C97(_17C9);
                    _00ED089E(_17CC);
                }
            }
            else
            {
            _76D6:
                if (_17D4 + 0x01 == 0x01)
                {
                _76E5:
                    _00ED0B7D(_17CD);
                    _00ED05EB(_17CC);
                }
            }
        }
    }
    else
    {
    _7706:
        _17D0 -= 0x0001;
        _00ED158B(_17D0);
        _00ECEE91(_17D0);
        UINT8 _17C9 = _00ECDE7F(_17D0);
        UINT8 _17C8 = _00ECDEF0(_17D0);
        _17CE += _00ECDD0E(_17D0);
        if (_17C9 + 0x01 != 0x01)
        {
        _782C:
            _17CD = _00ECC546(_17D0, _17CE);
            _17CC = _00ED0DB1(_17D0, _17CE, _17CD);
            if (_17CE > _00ECDBE5(_17D0, _17C9) && _17CE <= _17C8 + _00ECDBE5(_17D0, _17C9))
            {
                _7969:
                if (_17D4 + 0x01 == 0x01)
                {
                _7978:
                    _00ED0C97(_17C9);
                    _00ED089E(_17CC);
                }
            }
            else
            {
            _7999:
                if (_17D4 + 0x01 == 0x01)
                {
                _79A8:
                    _00ED0B7D(_17CD);
                    _00ED05EB(_17CC);
                }
            }
        }
        else
        {
        _79C9:
            _17CD = _00ECD75D(_17D0, _17CE);
            _17CC = _00ED0FDF(_17D0, _17CE, _17CD);
            if (_17D4 + 0x01 == 0x01)
            {
                _7A59:
                _00ED0B7D(_17CD);
                _00ED05EB(_17CC);
            }
        }
    }
_7A77:
    *(UINT16*)(MCU_memory + 0x182A) = _17D0;
    MCU_memory[0x182C] = _17CD;
    MCU_memory[0x182D] = _17CC;
}

// 00ECEAAB - 00ECED87
void _00ECEAAB(UINT16 _17D0, UINT8 _17D2, UINT8 _17D3)
{
    UINT16 _17CE = _17D0 / 0x03E8;
    UINT8 _17CD = _17CE;
    _17CE = _17D0 % 0x03E8 / 0x0064;
    UINT8 _17CC = _17CE;
    _17CE = _17D0 % 0x0064 / 0x000A;
    UINT8 _17CB = _17CE;
    _17CE = _17D0 % 0x000A;
    UINT8 _17CA = _17CE;
    UINT8 _17C9;
    UINT8 _17C8;
    if (_17D2 < 0x0A)
    {
    _7BB5:
        _17C9 = 0x00;
        _17C8 = _17D2;
    }
    else
    {
    _7BC6:
        _17C9 = _17D2 / 0x0A;
        _17C8 = _17D2 % 0x0A;
    }
    _7BE4:
    UINT8 _17C7;
    UINT8 _17C6;
    if (_17D3 < 0x0A)
    {
    _7BF0:
        _17C7 = 0x00;
        _17C6 = _17D3;
    }
    else
    {
    _7C01:
        _17C7 = _17D3 / 0x0A;
        _17C6 = _17D3 % 0x0A;
    }
_7C1F:
    _00ED2198(0x50, 0x03, _17CD);
    _00ED2198(0x57, 0x03, _17CC);
    _00ED2198(0x5E, 0x03, _17CB);
    _00ED2198(0x65, 0x03, _17CA);
    _00ED2198(0x76, 0x03, _17C9);
    _00ED2198(0x7D, 0x03, _17C8);
    _00ED2198(0x8C, 0x03, _17C7);
    _00ED2198(0x93, 0x03, _17C6);
}

// 00ECED88 - 00ECEE90
void _00ECED88(UINT8 _17CF, UINT8 _17D0, UINT8 _17D1)
{
    UINT8 _AADE[0x20]; // todo
    UINT8 _17C8 = 0x1F;
    UINT8 _17C7 = 0x4B;
    if (_17D1 >= 0x1D)
    {
    _7DB3:
        UINT8 _17C9 = _17CF * 0x0C + _17C7;
        UINT8 _17CA = _17D0 * 0x0D + _17C8;
        UINT8 _17CB = _17CF * 0x0C + _17C7+0x08;
        UINT8 _17CC = _17D0 * 0x0D + _17C8 + 0x08;
        UINT8* _17CD = *(UINT8**)(_AADE + (_17D1 - 0x01) * 0x0012 + 0x06);
        SysPicture(_17C9, _17CA, _17CB, _17CC, _17CD, 0x00);
    }
}

// 00ECEE91 - 00ECEF4A
void _00ECEE91(UINT16 _17D0)
{
    UINT8 _9531[0x18]; // todo
    UINT8 _17CD = _17D0 - 0x0748;
    UINT8 _17CC = _17CD % 0x0C;
    UINT8* _17CE = _9531 + _17CC * 0x0018;
    SysPicture(0x2B, 0x05, 0x37, 0x10, _17CE, 0x00);
}

// 00ECEF4B - 00ECEFDA
void _00ECEF4B(UINT8 _17CF)
{
    UINT8 _9DAE[0x0222]; // todo
    UINT8* _17CD = _9DAE + _17CF * 0x0111;
    SysPicture(0x01, 0x38, 0x32, 0x5E, _17CD, 0x00);
}

// 00ECEFDB - 00ECF1BA
UINT8 _00ECEFDB(UINT8 _17CF, UINT8 _17D0)
{
    UINT8 _908D[5]; // todo
    UINT8 _9092[5]; // todo
    if (_17D0 == 0x18)
    {
    _7FEA:
        _17CF = _17CF;
    }
    else if (strcmp((char*)MCU_memory + 0x181B, (char*)_908D) + 0x0001 == 0x0001)
    {
    _8043:
        if (_17CF == 0x0C)
        {
        _804F:
            _17CF = 0x00;
        }
        else
        {
            _8058:
            _17CF = _17CF;
        }
    }
    else if (strcmp((char*)MCU_memory + 0x181B, (char*)_9092) == 0x0001)
    {
        _80B1:
        if (_17CF == 0x0C)
        {
            _80BD:
            _17CF = 0x0C;
        }
        else
        {
            _80C6:
            _17CF += 0x0C;
        }
    }
_80D1:
    return _17CF;
}

// 00ECF0EB - 00ECF1BA
void _00ECF0EB(UINT8 _17CF, UINT8 _17D0)
{
    if (_17D0 == 0x18)
    {
    _80FA:
        _17CF = _17CF;
    }
    else if (_17CF > 0x0C)
    {
        _8116:
        _17CF -= 0x0C;
    }
    else if (_17CF+0x01 == 0x01)
    {
        _8133:
        _17CF = 0x0C;
    }
    else
    {
        _813C:
        _17CF = _17CF;
    }
_8144:
    SysAscii(0x0B, 0x19, _17CF / 0x0A + 0x30);
    SysAscii(0x13, 0x19, _17CF % 0x0A + 0x30);
}

// 00ECF1BB - 00ECF234
void _00ECF1BB(UINT8 _17CF)
{
    SysAscii(0x2C, 0x19, _17CF / 0x0A + 0x30);
    SysAscii(0x34, 0x19, _17CF % 0x0A + 0x30);
}

// 00ECF235 - 00ECF2AE
void _00ECF235(UINT8 _17CF)
{
    SysAscii(0x4E, 0x19, _17CF / 0x0A + 0x30);
    SysAscii(0x56, 0x19, _17CF % 0x0A + 0x30);
}

// 00ECF2AF - 00ECF345
void _00ECF2AF(UINT16 _17D0)
{
    UINT8 _17CB[0x0A];
    _itoa(_17D0, (char*)_17CB, 0x000A);
    SysPrintString(0x0B, 0x05, _17CB);
}

// 00ECF346 - 00ECF3BF
void _00ECF346(UINT8 _17CF)
{
    SysAscii(0x3F, 0x05, _17CF / 0x0A + 0x30);
    SysAscii(0x47, 0x05, _17CF % 0x0A + 0x30);
}

// 00ECF3C0 - 00ECF50B
UINT8 _00ECF3C0(UINT8 _17CF, UINT8 _17D0)
{
    UINT8 _908D[5];
    UINT8 _9092[5];
    if (_17CF == 0x18)
    {
    _83CF:
        SysLcdPartClear(0x73, 0x1A, 0x93, 0x29);
        _17D0 = _17D0;
    }
    else
    {
    _8406:
        if (_17D0 <= 0x0B)
        {
        _8414:
            strcpy((char*)MCU_memory + 0x181B, (char*)_908D);
            if (_17D0 + 0x01 == 0x01)
            {
            _8454:
                _17D0 = 0x0C;
            }
            else
            {
            _845D:
                _17D0 = _17D0;
            }
        }
        else if (_17D0 >= 0x0C)
        {
        _8474:
            strcpy((char*)MCU_memory + 0x181B, (char*)_9092);
            if (_17D0 == 0x0C)
            {
                _84B1:
                _17D0 = 0x0C;
            }
            else
            {
            _84BA:
                _17D0 -= 0x0C;
            }
        }
    _84C5:
        SysPrintString(0x73, 0x1A, MCU_memory + 0x181B);
    }
_84F2:
    return _17D0;
}

// 00ECF50C - 00ECFBC9
void _00ECF50C(UINT16 _17D0, UINT8 _17D2, UINT8 _17D3, UINT8* _17D4)
{
    UINT8 _9669[100];
    UINT8 _17CE;
    UINT8 _17CD;
    UINT16 _17CB = _00ECC28A(_17D0, _17D2, _17D3);
    UINT16 _17C9 = _17CB - _9669[_17D0 - 0x076C];
    if (_17C9 && _17C9 < 0x80) // todo 判断条件未能理解
    {
    _85D7:
        _17D0 = _17D0;
        UINT8 _17C8 = _00ECDE7F(_17D0);
        UINT8 _17C7 = _00ECDEF0(_17D0);
        if (_17C8 + 0x01 == 0x01)
        {
        _865A:
            _17CE = _00ECD75D(_17D0, _17C9);
            _17CD = _00ED0FDF(_17D0, _17C9, _17CE);
        }
        else
        {
        _86DE:
            _17CE = _00ECC546(_17D0, _17C9);
            _17CD = _00ED0DB1(_17D0, _17C9, _17CE);
            if (_17C9 > _00ECDBE5(_17D0, _17C8) && _17C9 <= _17C7 + _00ECDBE5(_17D0, _17C8))
            {
            _881B:
                _17CE = _17C8;
                _17CD = _17CD;
            }
            else
            {
            _882E:
                _17CE = _17CE;
                _17CD = _17CD;
            }
        }
    }
    else
    {
    _8841:
        _17D0 -= 0x0001;
        UINT8 _17C8 = _00ECDE7F(_17D0);
        UINT8 _17C7 = _00ECDEF0(_17D0);
        _17C9 += _00ECDD0E(_17D0);
        if (_17C8 + 0x01 != 0x01)
        {
        _8915:
            _17CE = _00ECC546(_17D0, _17C9);
            _17CD = _00ED0DB1(_17D0, _17C9, _17CE);
            if (_17C9 > _00ECDBE5(_17D0, _17C8) && _17C9 <= _17C7 + _00ECDBE5(_17D0, _17C8))
            {
                _8A52:
                _17CE = _17C8;
                _17CD = _17CD;
            }
            else
            {
                _8A65:
                _17CE = _17CE;
                _17CD = _17CD;
            }
        }
        else
        {
        _8A78:
            _17CE = _00ECD75D(_17D0, _17C9);
            _17CD = _00ED0FDF(_17D0, _17C9, _17CE);
        }
    }
_8AF9:
    UINT8 _17CF = _17D0 >> 0x0008;
    _17D4[0] = _17CF;
    _17CF = _17D0;
    _17D4[1] = _17CF;
    _17D4[2] = _17CE;
    _17D4[3] = _17CD;
}

// 00ECFBCA - 00ECFBE0
// 万年历 入口
UINT16 _00ECFBCA()
{
    return _00EC813A(0x00);
}

// 00ECFBE1 - 00ECFC12
void _00ECFBE1()
{
    UINT8 _17CF = _00EC813A(0x01);
}

// 00ECFC13 - 00ECFE48
void _00ECFC13(UINT8 _17CF)
{
    if (MCU_memory[0x1829] == 0x4A)
    {
    _8C31:
        _17CF + 0x01;
    }
}

// 00ED0000 - 00ED0488
void _00ED0000(UINT8 _17CF, UINT8 _17D0)
{
    /*
  ███    █      █
  █    █  ██  ██
  █    █  █  █  █
  ███    █  █  █
  █        █  █  █
  █        █  █  █
    */
    U8 _9ACE[] = { 0x72,0x20,0x4B,0x60,0x4A,0xA0,0x72,0xA0,0x42,0xA0,0x42,0xA0 };
    char _9092[] = "下午";
    /*
    █      █      █
    █      ██  ██
  █  █    █  █  █
  ███    █  █  █
█      █  █  █  █
█      █  █  █  █
    */
    U8 _9AC2[] = { 0x22,0x20,0x23,0x60,0x52,0xA0,0x72,0xA0,0x8A,0xA0,0x8A,0xA0 };
    char _908D[] = "上午";
    UINT8 _17CE;
    UINT8 _17CD;
    if (_17D0 == 0x0C)
    {
    _501F:
        if (_17CF > 0x0C)
        {
        _5030:
            _17CF -= 0x0C;
            SysPicture(0x3A, 0x1B, 0x44, 0x20, _9ACE, 0x00);
            strcpy((char*)MCU_memory + 0x181B, _9092);
        }
        else
        {
        _50AB:
            _17CF = _17CF;
            if (_17CF + 0x01 == 0x01)
            {
            _50C2:
                SysPicture(0x3A, 0x1B, 0x44, 0x20, _9AC2, 0x00);
                strcpy((char*)MCU_memory + 0x181B, _908D);
            }
            else
            {
            _5138:
                if (_17CF == 0x0C && strcmp((char*)MCU_memory + 0x181B, _908D) + 0x0001 == 0x0001)
                {
                _5192:
                    _17CF = 0x0C;
                    SysPicture(0x3A, 0x1B, 0x44, 0x20, _9ACE, 0x00);
                    strcpy((char*)MCU_memory + 0x181B, _9092);
                }
                else if (strcmp((char*)MCU_memory + 0x181B, _9092)+0x0001 == 0x0001)
                {
                _5256:
                    SysPicture(0x3A, 0x1B, 0x44, 0x20, _9ACE, 0x00);
                    strcpy((char*)MCU_memory + 0x181B, _9092);
                }
                else if (strcmp((char*)MCU_memory + 0x181B, _908D) + 0x0001 == 0x0001)
                {
                _5314:
                    SysPicture(0x3A, 0x1B, 0x44, 0x20, _9AC2, 0x00);
                    strcpy((char*)MCU_memory + 0x181B, _908D);
                }
            }
        }
    _5381:
        if (_17CF < 0x0A)
        {
        _538D:
            _17CE = 0x00;
            _17CD = _17CF;
        }
        else
        {
        _539E:
            _17CE = _17CF / 0x0A;
            _17CD = _17CF % 0x0A;
        }
    }
    else
    {
    _53BF:
        if (_17CF < 0x0A)
        {
        _53CB:
            _17CE = 0x00;
            _17CD = _17CF;
        }
        else
        {
        _53DC:
            _17CE = _17CF / 0x0A;
            _17CD = _17CF % 0x0A;
        }
    _53FA:
        SysLcdPartClear(0x3A, 0x1B, 0x44, 0x20);
    }
    _5426:
    _00ED2198(0x03, 0x17, _17CE);
    _00ED2198(0x0A, 0x17, _17CD);
}

// 00ED0489 - 00ED0539
void _00ED0489(UINT8 _17CF)
{
    UINT8 _17CE;
    UINT8 _17CD;
    if (_17CF < 0x0A)
    {
    _54A8:
        _17CE = 0x00;
        _17CD = _17CF;
    }
    else
    {
        _54B9:
        _17CE = _17CF / 0x0A;
        _17CD = _17CF % 0x0A;
    }
_54D7:
    _00ED2198(0x17, 0x17, _17CE);
    _00ED2198(0x1E, 0x17, _17CD);
}

// 00ED053A - 00ED05EA
void _00ED053A(UINT8 _17CF)
{
    UINT8 _17CE;
    UINT8 _17CD;
    if (_17CF < 0x0A)
    {
    _5559:
        _17CE = 0x00;
        _17CD = _17CF;
    }
    else
    {
    _556A:
        _17CE = _17CF / 0x0A;
        _17CD = _17CF % 0x0A;
    }
    _5588:
    _00ED2198(0x2B, 0x17, _17CE);
    _00ED2198(0x32, 0x17, _17CD);
}
/*
█
  █
  █      ██████
████    █      █
    █      █      █
  █    █  █      █
██  █    █      █
  ██      █      █
  █  █    █      █
  █    █  █      █
  █        █      █
  █        █      █
  █      █    █  █
  █    █        █
*/
U8 _9B2E[] = { 0x80,0x00,0x40,0x00,0x47,0xE0,0xF2,0x20,0x22,0x20,0x4A,0x20,0xD2,0x20,0x62,0x20,0x52,0x20,0x4A,0x20,0x42,0x20,0x42,0x20,0x44,0xA0,0x48,0x40 };
/*
          █
          █
          █
          █
          █
          █      █
███████████
          █
          █
          █
          █
          █
          █
          █
*/
U8 _9B4A[] = { 0x04,0x00,0x04,0x00,0x04,0x00,0x04,0x00,0x04,0x00,0x04,0x40,0xFF,0xE0,0x04,0x00,0x04,0x00,0x04,0x00,0x04,0x00,0x04,0x00,0x04,0x00,0x04,0x00 };
/*

      █      █
      █      █
      █      █
      █      █
███████████
      █      █
      █      █
      █      █
      █      █
      █      █
      █      █
      █████
      █      █
*/
U8 _9B66[] = { 0x00,0x00,0x11,0x00,0x11,0x00,0x11,0x00,0x11,0x00,0xFF,0xE0,0x11,0x00,0x11,0x00,0x11,0x00,0x11,0x00,0x11,0x00,0x11,0x00,0x1F,0x00,0x11,0x00 };
/*

                █
  █████████



              █
    ███████



                  █
███████████

*/
U8 _9ADA[] = { 0x00,0x00,0x00,0x80,0x7F,0xC0,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x00,0x3F,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x40,0xFF,0xE0,0x00,0x00 };
/*
█
  █    ██████
  █              █
█                  █
█  ███████  █
█        █        █
█        █        █
█  ███████  █
█        █        █
█        █        █
███████████
█                  █
█              █  █
█                █
    */
U8 _9AF6[] = { 0x40,0x00,0x27,0xE0,0x20,0x20,0x80,0x20,0xBF,0xA0,0x84,0x20,0x84,0x20,0xBF,0xA0,0x84,0x20,0x84,0x20,0xFF,0xE0,0x80,0x20,0x80,0xA0,0x80,0x40 };
U8 _9972[][0x1C] = {
    /*一*/0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x40,0xFF,0xE0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
    /*二*/0x00,0x00,0x00,0x00,0x01,0x00,0x7F,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x40,0xFF,0xE0,0x00,0x00,0x00,0x00,
    /*三*/0x00,0x00,0x00,0x80,0x7F,0xC0,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x00,0x3F,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x40,0xFF,0xE0,0x00,0x00,
    /*四*/0x00,0x40,0xFF,0xE0,0x92,0x40,0x92,0x40,0x92,0x40,0x92,0x40,0x92,0x40,0x92,0x40,0xA2,0x40,0xC1,0xC0,0xC0,0x40,0x80,0x40,0xFF,0xC0,0x80,0x40,
    /*五*/0x00,0x80,0x7F,0xC0,0x04,0x00,0x04,0x00,0x04,0x00,0x05,0x00,0x3F,0x80,0x09,0x00,0x09,0x00,0x09,0x00,0x09,0x00,0x09,0x00,0x09,0x40,0xFF,0xE0,
    /*六*/0x00,0x00,0x08,0x00,0x04,0x00,0x04,0x00,0x00,0x40,0xFF,0xE0,0x00,0x00,0x00,0x00,0x12,0x00,0x11,0x00,0x20,0x80,0x20,0x80,0x40,0x40,0x80,0x40,
    /*七*/0x08,0x00,0x08,0x00,0x08,0x00,0x08,0x40,0x09,0xE0,0x0E,0x00,0x78,0x00,0x88,0x00,0x08,0x00,0x08,0x00,0x08,0x20,0x08,0x20,0x08,0x20,0x07,0xE0,
    /*八*/0x00,0x00,0x02,0x00,0x0A,0x00,0x0A,0x00,0x0A,0x00,0x0A,0x00,0x12,0x00,0x11,0x00,0x11,0x00,0x20,0x80,0x20,0x80,0x40,0x40,0x40,0x40,0x80,0x20,
    /*九*/0x08,0x00,0x08,0x00,0x08,0x00,0x09,0x00,0x7F,0x80,0x09,0x00,0x09,0x00,0x09,0x00,0x09,0x00,0x11,0x00,0x11,0x20,0x21,0x20,0x21,0x20,0xC0,0xE0,
    /*十*/0x04,0x00,0x04,0x00,0x04,0x00,0x04,0x00,0x04,0x00,0x04,0x40,0xFF,0xE0,0x04,0x00,0x04,0x00,0x04,0x00,0x04,0x00,0x04,0x00,0x04,0x00,0x04,0x00,
};

// 00ED05EB - 00ED089D
void _00ED05EB(UINT8 _17CF)
{
    UINT8 _17CD = _17CF / 0x0A;
    UINT8 _17CC = _17CD;
    _17CD = _17CF % 0x0A;
    UINT8 _17CB = _17CD;
    switch (_17CC)
    {
    case 0x0000: // _5655
        SysLcdPartClear(0x1B, 0x27, 0x26, 0x34);
        SysPicture(0x1B, 0x27, 0x26, 0x34, _9B2E, 0x00);
        break;
    case 0x0001: // _56C0
        if (_17CB + 0x01 > 0x01)
        {
        _56D4:
            SysPicture(0x1B, 0x27, 0x26, 0x34, _9B4A, 0x00);
        }
        else
        {
            _5713:
            SysPicture(0x1B, 0x27, 0x26, 0x34, _9B2E, 0x00);
        }
        break;
    case 0x0002: // _5752
        SysPicture(0x1B, 0x27, 0x26, 0x34, _9B66, 0x00);
        break;
    case 0x0003: // _5791
        SysPicture(0x1B, 0x27, 0x26, 0x34, _9ADA, 0x00);
        break;
    }
_57D0:
    if (_17CB + 0x01 == 0x01)
    {
    _57DF:
        SysPicture(0x28, 0x27, 0x33, 0x34, _9B4A, 0x00);
    }
    else
    {
    _581E:
        SysPicture(0x28, 0x27, 0x33, 0x34, _9972[_17CB - 0x01], 0x00);
    }
}

// 00ED089E - 00ED0B7C
void _00ED089E(UINT8 _17CF)
{
    UINT8 _17CD = _17CF / 0x0A;
    UINT8 _17CC = _17CD;
    _17CD = _17CF % 0x0A;
    UINT8 _17CB = _17CD;
    SysLcdPartClear(0x1B, 0x27, 0x26, 0x34);
    switch (_17CC)
    {
    case 0x0000: // _5934
        SysPicture(0x1B, 0x27, 0x26, 0x34, _9B2E, 0x00);
        break;
    case 0x0001: // _5973
        if (_17CB + 0x01 > 0x01)
        {
        _5987:
            SysPicture(0x1B, 0x27, 0x26, 0x34, _9B4A, 0x00);
        }
        else
        {
        _59C6:
            SysPicture(0x1B, 0x27, 0x26, 0x34, _9B2E, 0x00);
        }
        break;
    case 0x0002: // _5A05
        SysPicture(0x1B, 0x27, 0x26, 0x34, _9B66, 0x00);
        break;
    case 0x0003: // _5A44
        SysPicture(0x1B, 0x27, 0x26, 0x34, _9ADA, 0x00);
        break;
    }
_5A83:
    SysLcdPartClear(0x28, 0x27, 0x33, 0x34);
    if (_17CB + 0x01 == 0x01)
    {
    _5ABE:
        SysPicture(0x28, 0x27, 0x33, 0x34, _9B4A, 0x00);
    }
    else
    {
    _5AFD:
        SysPicture(0x28, 0x27, 0x33, 0x34, _9972[_17CB - 0x01], 0x00);
    }
}

// 00ED0B7D - 00ED0C96
void _00ED0B7D(UINT8 _17CF)
{
    /*
        ███████
        █          █
        █          █
        ███████
        █          █
        █          █
        █          █
        ███████
        █          █
        █          █
        █          █
      █        █  █
    █            ██
  █                █
    */
    U8 _9B12[] = { 0x0F,0xE0,0x08,0x20,0x08,0x20,0x0F,0xE0,0x08,0x20,0x08,0x20,0x08,0x20,0x0F,0xE0,0x08,0x20,0x08,0x20,0x08,0x20,0x10,0xA0,0x20,0x60,0x40,0x20 };
    SysPicture(0x0F, 0x27, 0x1A, 0x34, _9B12, 0x00);
    if (_17CF == 0x01)
    {
    _5BD8:
        SysPicture(0x03, 0x27, 0x0E, 0x34, _9AF6, 0x00);
    }
    else
    {
        _5C17:
        SysPicture(0x03, 0x27, 0x0E, 0x34, _9972[_17CF - 0x01], 0x00);
    }
}

// 00ED0C97 - 00ED0DB0
void _00ED0C97(UINT8 _17CF)
{
    /*
  █
    █    ██████
    █              █
█                  █
█  ███████  █
█        █        █
█        █        █
█  ███████  █
█        █        █
█        █        █
███████████
█                  █
█              █  █
█                █
    */
    U8 _9B82[] = { 0x40,0x00,0x27,0xE0,0x20,0x20,0x80,0x20,0xBF,0xA0,0x84,0x20,0x84,0x20,0xBF,0xA0,0x84,0x20,0x84,0x20,0xFF,0xE0,0x80,0x20,0x80,0xA0,0x80,0x40 };
    SysPicture(0x03, 0x27, 0x0E, 0x34, _9B82, 0x00);
    if (_17CF == 0x01)
    {
        _5CF2:
        SysPicture(0x10, 0x27, 0x1B, 0x34, _9AF6, 0x00);
    }
    else
    {
        _5D31:
        SysPicture(0x10, 0x27, 0x1B, 0x34, _9972[_17CF - 0x01], 0x00);
    }
}

// 00ED0DB1 - 00ED0FDE
UINT8 _00ED0DB1(UINT16 _17D0, UINT16 _17D2, UINT8 _17D4)
{
    UINT8 _17CF;
    UINT8 _17CB = _00ECDE7F(_17D0);
    UINT8 _17CA = _00ECDEF0(_17D0);
    if (_17D4 == _17CB + 0x0C)
    {
    _5E34:
        UINT8 _17CE = _17D4 - 0x0C;
        UINT16 _17CC = _00ECDBE5(_17D0, _17CE);
        _17CF = _17D2 - _17CC;
    }
    else
    {
    _5E9E:
        if (_17D2 > _17CA + _00ECDBE5(_17D0, _17CB))
        {
        _5F0D:
            _17D2 -= _17CA;
            _17CF = _00ED0FDF(_17D0, _17D2, _17D4);
        }
        else
        {
        _5F81:
            _17CF = _00ED0FDF(_17D0, _17D2, _17D4);
        }
    }
_5FC5:
    return _17CF;
}

// 00ED0FDF - 00ED106F
UINT8 _00ED0FDF(UINT16 _17D0, UINT16 _17D2, UINT8 _17D4)
{
    UINT8 _17CE = _17D4 - 0x01;
    UINT16 _17CC = _00ECDBE5(_17D0, _17CE);
    UINT8 _17CF = _17D2 - _17CC;
    return _17CF;
}

// 00ED1070 - 00ED1317
void _00ED1070(UINT16 _17D0, UINT8 _17D2, UINT8 _17D3)
{
    U8 _9B9E[][0x16] = {
        /*小寒*/0x10,0x10,0x10,0xFE,0x10,0xAA,0x54,0xFC,0x54,0x28,0x54,0xFE,0x92,0x28,0x92,0x24,0x10,0x5A,0x10,0xA0,0x70,0x1C,
        /*大寒*/0x10,0x10,0x10,0xFE,0x10,0xAA,0xFE,0xFC,0x10,0x28,0x10,0xFE,0x28,0x28,0x28,0x24,0x44,0x5A,0x44,0xA0,0x82,0x1C,
        /*立春*/0x20,0x20,0x03,0xFE,0xF8,0x40,0x01,0xFC,0x80,0x80,0x83,0xFE,0x49,0x8C,0x4A,0xEA,0x50,0xB8,0x10,0x88,0xF8,0xF8,
        /*雨水*/0xFE,0x10,0x10,0x10,0xFE,0x10,0x92,0xD2,0xDA,0x54,0x96,0x58,0x92,0x98,0xDA,0x94,0x96,0x92,0x92,0x90,0x96,0x70,
        /*惊蛰*/0x24,0x48,0x2E,0xFE,0xB0,0x4A,0xAE,0xEE,0xAA,0x5A,0x2A,0x50,0x2E,0x7E,0x24,0x52,0x2E,0x7E,0x35,0x14,0x24,0xFE,
        /*春分*/0x08,0x24,0xFE,0x24,0x10,0x42,0x7E,0x42,0x20,0x80,0xFE,0x7E,0x66,0x12,0xB4,0x12,0x2C,0x22,0x24,0x42,0x3C,0x8C,
        /*清明*/0x88,0x0E,0x7E,0xEA,0x08,0xAA,0x9C,0xAE,0x48,0xEA,0x3E,0xAA,0x54,0xAE,0x5C,0xEA,0xD4,0x0A,0x5C,0x12,0x54,0x26,
        /*谷雨*/0x44,0xFC,0x82,0x10,0x10,0xFE,0x28,0x92,0x44,0xDA,0x82,0x96,0x7E,0x92,0x42,0xDA,0x42,0x96,0x42,0x92,0x7E,0x96,
        /*立夏*/0x23,0xFE,0x00,0x40,0xF9,0xFC,0x01,0x04,0x81,0xFC,0x81,0x04,0x49,0xFC,0x48,0x88,0x51,0x50,0x10,0x30,0xFB,0xCE,
        /*小满*/0x10,0x28,0x12,0xFE,0x11,0x28,0x54,0xFE,0x55,0x28,0x52,0xFE,0x92,0xAA,0x92,0xBA,0x12,0xD6,0x12,0x92,0x72,0x8E,
        /*芒种*/0x48,0xC8,0xFD,0x88,0x48,0xBE,0x21,0xEA,0x10,0xAA,0xFD,0xAA,0x41,0xFE,0x40,0x88,0x40,0x88,0x40,0x88,0x7C,0x88,
        /*夏至*/0xFE,0xFE,0x10,0x10,0x7E,0x14,0x42,0x22,0x7E,0x7E,0x42,0x08,0x7E,0x08,0x24,0x7E,0xD8,0x08,0x14,0x08,0xE2,0xFE,
        /*小暑*/0x10,0xFC,0x10,0x84,0x10,0xFC,0x54,0x86,0x54,0xFC,0x54,0x28,0x91,0xFE,0x90,0x44,0x11,0xFC,0x10,0x44,0x70,0x7C,
        /*大暑*/0x10,0xFC,0x10,0x84,0x10,0xFC,0xFC,0x86,0x10,0xFC,0x10,0x28,0x29,0xFE,0x28,0x44,0x45,0xFC,0x44,0x44,0x82,0x7C,
        /*立秋*/0x20,0xC8,0x03,0x88,0xF8,0xAA,0x03,0xEC,0x80,0xA8,0x81,0xA8,0x49,0xC8,0x4A,0x94,0x52,0x94,0x10,0xA4,0xF8,0xC2,
        /*处暑*/0x84,0xFC,0x84,0x84,0xF4,0xFC,0x96,0x86,0x94,0xFC,0xA4,0x28,0xA5,0xFE,0x44,0x44,0x45,0xFC,0xB4,0x44,0x0E,0x7C,
        /*白露*/0x10,0x7C,0x20,0x10,0xFE,0xFE,0x82,0xAA,0x82,0xF2,0x82,0x9C,0xFE,0xF4,0x82,0x28,0x82,0xBE,0x82,0xB4,0xFE,0xFC,
        /*秋分*/0x64,0x24,0xC4,0x24,0x55,0x42,0xF6,0x42,0x54,0x80,0xD4,0x7E,0xE4,0x12,0x4A,0x12,0x4A,0x22,0x52,0x42,0x61,0x8C,
        /*寒露*/0x10,0x7C,0xFE,0x10,0xAA,0xFE,0xFC,0xAA,0x28,0xF2,0xFE,0x9C,0x28,0xF4,0x24,0x28,0x5A,0xBE,0xA0,0xB4,0x1C,0xFC,
        /*霜降*/0xFE,0xEE,0x08,0xAA,0xFE,0xBC,0x8A,0xA4,0xEA,0xDE,0x40,0xA4,0xEE,0xBE,0x4A,0xD4,0xEE,0xBE,0xCA,0x84,0x4E,0x84,
        /*立冬*/0x20,0x40,0x00,0xFC,0xFC,0x88,0x01,0x50,0x80,0x20,0x80,0x50,0x49,0x8C,0x48,0x32,0x50,0x00,0x10,0xE0,0xFC,0x18,
        /*小雪*/0x10,0xFC,0x10,0x10,0x11,0xFE,0x55,0x12,0x54,0x58,0x54,0x10,0x92,0xFC,0x92,0x04,0x10,0x7C,0x10,0x04,0x70,0xFC,
        /*大雪*/0x10,0x7C,0x10,0x10,0x10,0xFE,0xFE,0x92,0x10,0x58,0x10,0x10,0x28,0x7C,0x28,0x04,0x44,0x7C,0x44,0x04,0x82,0x7C,
        /*冬至*/0x20,0xFE,0x7E,0x10,0x44,0x14,0xA8,0x22,0x10,0x7E,0x28,0x08,0xC6,0x08,0x19,0x7E,0x00,0x08,0x70,0x08,0x0C,0xFE,
    };
    UINT8 _7B27[0x2C0] = { 0x00,0x34,0x20,0x20,0xD4,0xAA,0xCF,0xFC,0xBD,0xDA,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x00,0x35,0x20,0x20,0xB9,0xFA,0xBC,0xCA,0xC7,0xE9,0xC8,0xCB,0xBD,0xDA,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x00,0x36,0x20,0x20,0xB9,0xFA,0xBC,0xCA,0xB8,0xBE,0xC5,0xAE,0xBD,0xDA,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x00,0x37,0x20,0x20,0xD6,0xD0,0xB9,0xFA,0xD6,0xB2,0xCA,0xF7,0xBD,0xDA,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x00,0x38,0x20,0x20,0xB9,0xFA,0xBC,0xCA,0xCF,0xFB,0xB7,0xD1,0xD5,0xDF,0xC8,0xA8,0xD2,0xE6,0xC8,0xD5,0x20,0x20,0x00,0x39,0x20,0x20,0xB9,0xFA,0xBC,0xCA,0xCF,0xFB,0xB3,0xFD,0xD6,0xD6,0xD7,0xE5,0xC6,0xE7,0xCA,0xD3,0xC8,0xD5,0x00,0x31,0x30,0x20,0xCA,0xC0,0xBD,0xE7,0xCB,0xAE,0xC8,0xD5,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x00,0x31,0x31,0x20,0xCA,0xC0,0xBD,0xE7,0xC6,0xF8,0xCF,0xF3,0xC8,0xD5,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x00,0x31,0x32,0x20,0xCA,0xC0,0xBD,0xE7,0xB7,0xC0,0xD6,0xCE,0xBD,0xE1,0xBA,0xCB,0xB2,0xA1,0xC8,0xD5,0x20,0x20,0x00,0x31,0x33,0x20,0xB9,0xFA,0xBC,0xCA,0xD3,0xDE,0xC8,0xCB,0xBD,0xDA,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x00,0x31,0x34,0x20,0xC7,0xE5,0xC3,0xF7,0xBD,0xDA,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x00,0x31,0x35,0x20,0xCA,0xC0,0xBD,0xE7,0xCE,0xC0,0xC9,0xFA,0xC8,0xD5,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x00,0x31,0x36,0x20,0xCA,0xC0,0xBD,0xE7,0xB5,0xD8,0xC7,0xF2,0xC8,0xD5,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x00,0x31,0x37,0x20,0xB9,0xFA,0xBC,0xCA,0xC0,0xCD,0xB6,0xAF,0xBD,0xDA,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x00,0x31,0x38,0x20,0xCA,0xC0,0xBD,0xE7,0xD0,0xC2,0xCE,0xC5,0xD7,0xD4,0xD3,0xC9,0xC8,0xD5,0x20,0x20,0x20,0x20,0x00,0x31,0x39,0x20,0xD6,0xD0,0xB9,0xFA,0xC7,0xE0,0xC4,0xEA,0xBD,0xDA,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x00,0x32,0x30,0x20,0xB9,0xFA,0xBC,0xCA,0xC4,0xB8,0xC7,0xD7,0xBD,0xDA,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x00,0x32,0x31,0x20,0xB9,0xFA,0xBC,0xCA,0xBC,0xD2,0xCD,0xA5,0xC8,0xD5,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x00,0x32,0x32,0x20,0xCA,0xC0,0xBD,0xE7,0xB5,0xE7,0xD0,0xC5,0xC8,0xD5,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x00,0x32,0x33,0x20,0xCA,0xC0,0xBD,0xE7,0xCE,0xDE,0xD1,0xCC,0xC8,0xD5,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x00,0x32,0x34,0x20,0xB9,0xFA,0xBC,0xCA,0xB6,0xF9,0xCD,0xAF,0xBD,0xDA,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x00,0x32,0x35,0x20,0xCA,0xC0,0xBD,0xE7,0xBB,0xB7,0xBE,0xB3,0xC8,0xD5,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x00,0x32,0x36,0x20,0xB9,0xFA,0xBC,0xCA,0xB8,0xB8,0xC7,0xD7,0xBD,0xDA,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x00,0x32,0x37,0x20,0xB6,0xCB,0xCE,0xE7,0xBD,0xDA,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x00,0x32,0x38,0x20,0xB9,0xFA,0xBC,0xCA,0xBD,0xFB,0xB6,0xBE,0xC8,0xD5,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x00,0x32,0x39,0x20,0xA1,0xB6,0xC1,0xAA,0xBA,0xCF,0xB9,0xFA,0xCF,0xDC,0xD5,0xC2,0xA1,0xB7,0xC8,0xD5,0x20,0x20,0x00,0x33,0x30,0x20,0xD6,0xD0,0xB9,0xFA,0xB9,0xB2,0xB2,0xFA,0xB5,0xB3,0xB5,0xAE,0xC9,0xFA,0xC8,0xD5,0x20,0x20,0x00,0x33,0x31,0x20,0xCA,0xC0,0xBD,0xE7,0xC8,0xCB,0xBF,0xDA,0xC8,0xD5,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x00,0x33,0x32,0x20,0xD6,0xD0,0xB9,0xFA,0xBD,0xA8,0xBE,0xFC,0xBD,0xDA,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x00,0x33,0x33,0x20,0xC4,0xC9,0xC3,0xD7,0xB1,0xC8,0xD1,0xC7,0xC8,0xD5,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x00,0x33,0x34,0x20,0xB9,0xFA,0xBC,0xCA,0xC9,0xA8,0xC3,0xA4,0xC8,0xD5,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x00,0x33,0x35,0x20,0xD6,0xD0,0xB9,0xFA,0xBD,0xCC,0xCA,0xA6,0xBD,0xDA,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20 };
    SysLcdPartClear(0x35, 0x27, 0x43, 0x34);
    UINT8 _17CD = (_17D2 - 0x01) * 0x02;
    UINT16 _17CB = _17CD + (_17D0 - 0x076D) * 0x0018;
    UINT8 _17CA = _7B27[_17CB];
    UINT8 _17C9 = _7B27[0x0001 + _17CB];
    SysLcdPartClear(0x35, 0x2A, 0x43, 0x34);
    if (_17D3 == _17CA)
    {
    _6194:
        SysLcdPartClear(0x35, 0x27, 0x43, 0x34);
        SysPicture(0x35, 0x2A, 0x43, 0x34, _9B9E[_17CD], 0x00);
    }
    else if (_17D3 == _17C9)
    {
        _623D:
        SysLcdPartClear(0x35, 0x27, 0x43, 0x34);
        SysPicture(0x35, 0x2A, 0x43, 0x34, _9B9E[_17CD + 0x01], 0x00);
    }
    else
    {
        _62DB:
        SysLcdPartClear(0x35, 0x27, 0x43, 0x34);
    }
}

// 00ED1318 - 00ED146E
// 返回某年第X天在哪个月里
UINT8 _00ED1318(UINT16 _17D0, UINT16 _17D2)
{
    UINT16 _8DE7[] = { 0x0000,0x001F,0x003B,0x005A,0x0078,0x0097,0x00B5,0x00D4,0x00F3,0x0111,0x0130,0x014E,0x016D };
    UINT16 _8E01[] = { 0x0000,0x001F,0x003C,0x005B,0x0079,0x0098,0x00B6,0x00D5,0x00F4,0x0112,0x0131,0x014F,0x016E };
    // 返回_17D0年有多少天
    UINT16 _17CE = _00ECC000(_17D0);
    if (_17CE == 365)
    {
    _6377:
        for (UINT8 _17CD = 0x00; _17CD <= 0x0C; _17CD++)
        {
        _639A:
            if (_17D2 <= _8DE7[_17CD])
            {
            _63DE:
                return _17CD;
            }
        }
    }
    else
    {
    _63EB:
        for (UINT8 _17CD = 0x00; _17CD <= 0x0C; _17CD++)
        {
            _640E:
            if (_17D2 <= _8E01[_17CD])
            {
            _6452:
                return _17CD;
            }
        }
    }
    return 0x00;
}

// 00ED146F - 00ED158A
UINT8 _00ED146F(UINT16 _17D0, UINT8 _17D2, UINT16 _17D3)
{
    UINT16 _8DE7[] = { 0x0000,0x001F,0x003B,0x005A,0x0078,0x0097,0x00B5,0x00D4,0x00F3,0x0111,0x0130,0x014E,0x016D };
    UINT16 _8E01[] = { 0x0000,0x001F,0x003C,0x005B,0x0079,0x0098,0x00B6,0x00D5,0x00F4,0x0112,0x0131,0x014F,0x016E };
    // 返回_17D0年有多少天
    UINT16 _17CE = _00ECC000(_17D0);
    UINT8 _17CD;
    if (_17CE == 365)
    {
    _64CE:
        _17CD = _17D3 - _8DE7[_17D2 - 0x01];
    }
    else
    {
        _6521:
        _17CD = _17D3 - _8E01[_17D2 - 0x01];
    }
_6571:
    return _17CD;
}

// 00ED158B - 00ED1644
void _00ED158B(UINT16 _17D0)
{
    /*
                    █
    ██████████
    █      █      █
    █      █      █
    █████████
    █      █      █
    █      █      █
    █████████
            █
            █
            █
            █
    */
    U8 _9441[] = { 0x00,0x20,0x3F,0xF0,0x22,0x20,0x22,0x20,0x3F,0xE0,0x22,0x20,0x22,0x20,0x3F,0xE0,0x02,0x00,0x02,0x00,0x02,0x00,0x02,0x00 };
    UINT8 _17CD = _17D0 - 0x0748;
    UINT8 _17CC = _17CD % 0x0A;
    UINT8* _17CE = _9441 + _17CC * 0x0018;
    SysPicture(0x1E, 0x05, 0x2A, 0x10, _17CE, 0x00);
}

// 00ED1645 - 00ED177E
UINT8 _00ED1645(UINT16 _17D0, UINT8 _17D2, UINT8 _17D3, UINT8 _17D4)
{
    UINT8 _17CE = _00ECC190(_17D0, _17D2, 0x01);
    UINT8 _17CD;
    if (_17D4 == _17CE)
    {
    _669E:
        _17CD = (_17D3 - 0x01) * 0x07 + 0x01;
    }
    else if (_17D4 > _17CE)
    {
    _66C9:
        UINT8 _17CF = _17D4 - _17CE + 0x01;
        _17CD = (_17D3 - 0x01) * 0x07 + _17CF;
    }
    else if (_17D4 < _17CE)
    {
    _6701:
        UINT8 _17CF = _17D4 - _17CE + 0x01;
        _17CD = _17D3 * 0x07 + _17CF;
    }
_6725:
    UINT8 a = _00ECC0B6(_17D0, _17D2);
    if (_17CD < a)
    {
    _6765:
        return _17CD;
    }
    else
    {
    _676C:
        return _17CD - a;
    }
}

// 00ED177F - 00ED1C06
void _00ED177F(UINT8* _17D0)
{
    U16 _17CB;
    UINT8 _17CA;
    UINT16 _17C7 = Inityear;
    UINT8 _17C5 = SysGetHour();
    UINT8 _17C4 = SysGetMinute();
    UINT8 _17C3 = SysGetSecond();
    SysGetDay(&_17CB);
    if (_17CB > _00ECC000(_17C7))
    {
    _6845:
        _17C7++;
        if (_17C7 > 0x0834)
        {
        _6888:
            _17C7 = 0x076D;
            _17CB -= _00ECC000(0x0834);
        }
        else
        {
        _68E7:
            _17CB -= _00ECC000(_17C7 - 0x0001);
        }
    _6948:
        SysSetDay(_17CB);
        Inityear = _17C7;
    }
_6986:
    _17CA = _00ED1318(_17C7, _17CB);
    UINT8 _17C9 = _00ED146F(_17C7, _17CA, _17CB);
    UINT8 _17C6 = _00ECC190(_17C7, _17CA, _17C9);
    _17D0[0] = _17C7 >> 0x0008;
    _17D0[1] = _17C7;
    _17D0[2] = _17CA;
    _17D0[3] = _17C9;
    _17D0[4] = _17C6;
    _17D0[5] = _17C5;
    _17D0[6] = _17C4;
    _17D0[7] = _17C3;
}

// 00ED1C07 - 00ED1D01
// 初始化时间到24小时制的2004-10-01 12:00:00
void _00ED1C07()
{
    Inityear = 2004;
    TimeLag = 24;
    //        返回Inityear年10月1日是当年的第多少天
    SysSetDay(_00ECC28A(Inityear, 10, 1));
    SysSetHour(12);
    SysSetMinute(0);
    SysSetSecond(0);
}

// 00ED20B0 - 00ED2197
void _00ED20B0(UINT8 _17CF, UINT8 _17D0)
{
    UINT8 _17CE = 0x00;
    if (_17CE < 0x05)
    {
        _70D5:
        for (UINT8 _17CD = 0x01; _17CD <= _17D0; _17CD++)
        {
        _70FC:
            _00ECED88(_17CF, _17CE, _17CD);
            _17CF += 0x01;
            if (_17CF > 0x06 && _17CD <= _17D0)
            {
            _7172:
                _17CE = 0x00;
                _17CF = 0x00;
            }
        }
    }
}

// 00ED2198 - 00ED2245
void _00ED2198(UINT8 _17CF, UINT8 _17D0, UINT8 _17D1)
{
    U8 _AA7A[] = {
        /*0*/0x78,0xCC,0xCC,0xCC,0xCC,0xCC,0xCC,0xCC,0xCC,0x78,
        /*1*/0x18,0x38,0x78,0x58,0x18,0x18,0x18,0x18,0x18,0x18,
        /*2*/0x78,0xCC,0x0C,0x0C,0x18,0x38,0x30,0x60,0xC0,0xFC,
        /*3*/0x78,0xCC,0x0C,0x0C,0x38,0x0C,0x0C,0x0C,0xCC,0x78,
        /*4*/0x18,0x18,0x38,0x38,0x58,0x58,0x98,0xFC,0x18,0x18,
        /*5*/0xFC,0xC0,0xC0,0xF8,0xCC,0x0C,0x0C,0x0C,0xCC,0x78,
        /*6*/0x38,0x4C,0xC0,0xC0,0xF8,0xCC,0xCC,0xCC,0xCC,0x78,
        /*7*/0xFC,0x0C,0x18,0x18,0x30,0x30,0x30,0x60,0x60,0x60,
        /*8*/0x78,0xCC,0xCC,0xCC,0x78,0xCC,0xCC,0xCC,0xCC,0x78,
        /*9*/0x78,0xCC,0xCC,0xCC,0xCC,0x7C,0x0C,0x0C,0xC8,0x70,
    };
    UINT8 _17CB = _17CF + 0x05;
    UINT8 _17CC = _17D0 + 0x09;
    UINT8* _17CD = _AA7A + _17D1 * 0x000A;
    SysPicture(_17CF, _17D0, _17CB, _17CC, _17CD, 0x00);
}

// 00EDBD1F - 00EDBED9
void _00EDBD1F()
{
    U32 _17B8;
    U16 _17B6;
    U8 _17C4[0x0A];
    UINT8 _17C3 = 0x0F;
    UINT16 _17C1 = 0x0001;
    UINT8 _17BE = 0x02;
    UINT8 _17BD = 0x01;
    UINT16 _17BF = 0x0000;
    SysIconBell(0x00);
    FileNum(_17C3, &_17B6);
    while (_17B6)
    {
    _8DAC:
        FileSearch(_17C3, _17C1, &_17BF, _17C4);
        FileOpen(_17BF, _17C3, _17BE, &_17BD, &_17B8);
        FileDel(_17BD);
        _17B6 -= 0x0001;
    }
_8EB1:
    SysIconBell(0x00);
    GuiTimeDayIntRefresh();
}

// 00EDF700 - 00EDF788
void _00EDF700(UINT8 _17CF, UINT8 _17D0)
{
    UINT8 _17CE = 0x38;
    UINT8 _17CD = 0x39;
    UINT8 _17CC = _00ECC36F(_17CF, _17D0);
    _00ECDFB6(_17CE, _17CD, _17CC);
}

void _00EE350F(UINT8* _17D0)
{
    UINT8 _17C9;
    U16 filenum;
    U16 filename;
    U8 information[0x0A];
    U8 filehandle;
    UINT8* _17AB = (UINT8*)SysMemAllocate(0x0023);
    fillmem(_17AB, 0x0023, 0x00);
    UINT8 datalength = 0x23;
    UINT8 origin = FromTop;
    UINT16 fileoffset = 0x0007;
    U32 filelength = 0x0000002B;
    UINT8 openmode = ReadAndWrite;
    UINT8 filetype = 0x0F;
    UINT8 _17C8 = FileNum(filetype, &filenum);
    for (UINT16 fileorder = 0x0001; fileorder <= filenum; fileorder++)
    {
    _8663:
        _17C8 = FileSearch(filetype, fileorder, &filename, information);
        UINT8 _AD56[] = "alarminfo";
        if (strcmp((char*)information, (char*)_AD56) == 0x00)
        {
        _871F:
            _17C8 = FileOpen(filename, filetype, openmode, &filehandle, &filelength);
            if (_17C8)
            {
            _879B:
                if (_17C8)
                {
                _87A4:
                    _17C8 = FileSeek(filehandle, fileoffset, origin);
                    _17C8 = FileRead(filehandle, datalength, _17AB);
                }
            }
            _881B:
            _17C8 = FileClose(filehandle);
            break;
        }
    }
_8834:
    UINT8 _1793 = 0x00;
    UINT8 _17A3 = 0x01;
    UINT8 _1795 = 0x02;
    U32 _17A6 = 0x00000002;
    UINT8 _17AA = 0x0F;
    U16 _17A4;
    U8 _1796[0x0A];
    UINT8 _17A2 = 0x01;
    U16 _17A0;
    UINT8 _1794 = FromTop;
    _17C8 = FileNum(_17AA, &_17A0);
    for (UINT16 _17C3 = 0x0001; _17C3 <= _17A0; _17C3 += 0x0001)
    {
    _88F9:
        _17C8 = FileSearch(_17AA, _17C3, &_17A4, _1796);
        UINT8 _AD60[] = "alarmsite";
        if (strcmp((char*)_1796, (char*)_AD60) == 0x00)
        {
        _89B5:
            _17C8 = FileOpen(_17A4, _17AA, _1795, &_17A3, &_17A6);
            if (_17C8)
            {
                _8A31:
                if (_17C8)
                {
                _8A3A:
                    _17C8 = FileSeek(_17A3, _1793, _1794);
                    _17C8 = FileRead(_17A3, _17A2, &_17C9);
                }
            }
        _8AAC:
            // 汇编中为_17B5，怀疑为BUG，这里修改为_17A3
            _17C8 = FileClose(_17A3);
            break;
        }
    }
_8AC5:
    U16 _17CC;
    SysGetDay(&_17CC);
    *_17D0 = _17AB[((0x02 * _17C9) & 0x00FF) + 0x0001];
    _17D0++;
    *_17D0 = _17AB[((0x02 * _17C9) & 0x00FF)];
    _17D0++;
    *_17D0 = _17AB[((0x0E + _17C9) & 0x00FF)];
    _17D0++;
    *_17D0 = _17AB[((0x15 + _17C9) & 0x00FF)];
    _17D0++;
    *_17D0 = _17AB[((0x1C + _17C9) & 0x00FF)];
    SysMemFree((char*)_17AB);
    U8 _1789[0x0A];
    _17C8 = FileNum(_17AA, &_17A0);
    for (UINT16 _17C3 = 0x0001; _17C3 <= _17A0; _17C3++)
    {
    _8D1A:
        _17C8 = FileSearch(_17AA, _17C3, &_17A4, _1789);
        UINT8 _AD60[] = "alarmsite";
        if (strcmp((char*)_1789, (char*)_AD60) == 0x00)
        {
        _8DD6:
            _17C8 = FileOpen(_17A4, _17AA, _1795, &_17A3, &_17A6);
            _17C8 = FileDel(_17A3);
            _17C8 = FileClose(_17A3);
            break;
        }
    }
_8E75:
    UINT8 _AD60[] = "alarmsite";
    _17C8 = FileCreat(_17AA, _17A6, _AD60, &_17A4, &_17A3);
    if (_17C8)
    {
    _8EF4:
        _17C8 = FileWrite(_17A3, _17A2, &_17C9);
        if (_17C8)
        {
            _8F39:
            _17C8 = FileClose(_17A3);
        }
    }
    else
    {
        UINT8 _904F[] = "     操作失败";  // _00FD804F
    _8F4F:
        GuiMsgBox(_904F, 0x00C8);
    }
}

// 00EE4000 - 00EE442C
void _00EE4000()
{
    SysRect(0x00, 0x00, 0x9E, 0x5F);
    SysLine(0x47, 0x00, 0x47, 0x5F);
    SysLine(0x47, 0x0F, 0x9E, 0x0F);
    SysLine(0x00, 0x37, 0x47, 0x37);
    SysLine(0x33, 0x37, 0x33, 0x5F);
    SysPutPixel(0x13, 0x19, 0x01);
    SysPutPixel(0x14, 0x19, 0x01);
    SysPutPixel(0x13, 0x1A, 0x01);
    SysPutPixel(0x14, 0x1A, 0x01);
    SysPutPixel(0x13, 0x1D, 0x01);
    SysPutPixel(0x14, 0x1D, 0x01);
    SysPutPixel(0x13, 0x1E, 0x01);
    SysPutPixel(0x14, 0x1E, 0x01);
    SysPutPixel(0x27, 0x19, 0x01);
    SysPutPixel(0x28, 0x19, 0x01);
    SysPutPixel(0x27, 0x1A, 0x01);
    SysPutPixel(0x28, 0x1A, 0x01);
    SysPutPixel(0x27, 0x1D, 0x01);
    SysPutPixel(0x28, 0x1D, 0x01);
    SysPutPixel(0x27, 0x1E, 0x01);
    SysPutPixel(0x28, 0x1E, 0x01);
    SysLine(0x6E, 0x07, 0x73, 0x07);
    SysLine(0x6E, 0x08, 0x73, 0x08);
    SysLine(0x85, 0x07, 0x8A, 0x07);
    SysLine(0x85, 0x08, 0x8A, 0x08);
}

UINT8 _00EE4773()
{
    UINT8 _17CD;
    UINT8 _17A5[0x0A];
    UINT8 origin = FromTop;
    U16 filenum;
    U8 information[0x0A];
    UINT8 datalength = 0x02;
    UINT8 filetype = 0x0F;
    U32 filelength = 0x00000003;
    UINT8 openmode = ReadAndWrite;
    UINT8 filehandle = 0x01;
    U16 filename = 0x0000;
    UINT16 fileoffset = 0x0000;
    UINT8 _17AF = 0x00;
    UINT8 _17B0 = 0x00;
    UINT8 _8DCF[0x0A] = "alarmtype";
    SysMemcpy(_17A5, _8DCF, 0x000A);
    UINT8 _17CC = FileNum(filetype, &filenum);
    for (UINT16 fileorder = 0x0001; fileorder <= filenum; fileorder++)
    {
    _58C3:
        _17CC = FileSearch(filetype, fileorder, &filename, information);
        if (strcmp((char*)information, (char*)_17A5) == 0x0000)
        {
        _5984:
            _17CC = FileOpen(filename, filetype, openmode, &filehandle, &filelength);
            if (_17CC)
            {
            _5A00:
                _17CC = FileSeek(filehandle, fileoffset, origin);
                _17CC = FileRead(filehandle, datalength, &_17AF);
                _17CC = FileClose(filehandle);
            }
            break;
        }
    }
_5A92:
    if (_17AF == 0x00)
    {
    _5AA1:
        switch (_17B0 / 0x10)
        {
        case 0x0000: // 5ACB
            _17CD = 0x01;
            break;
        case 0x0001: // 5AD4
            _17CD = 0x03;
            break;
        case 0x0002: // 5ADD
            _17CD = 0x05;
            break;
        case 0x0003: // 5AE6
            _17CD = 0x07;
            break;
        case 0x0004: // 5AEF
            _17CD = 0x09;
            break;
        case 0x0005: // 5AF8
            _17CD = 0x0B;
            break;
        }
    }
_5B01:
    if (_17AF == 0x50)
    {
        _5B0D:
        switch (_17B0 / 0x10)
        {
        case 0x0000: // 5B37
            _17CD = 0x02;
            break;
        case 0x0001: // 5B40
            _17CD = 0x04;
            break;
        case 0x0002: // 5B49
            _17CD = 0x06;
            break;
        case 0x0003: // 5B52
            _17CD = 0x08;
            break;
        case 0x0004: // 5B5B
            _17CD = 0x0A;
            break;
        case 0x0005: // 5B64
            _17CD = 0x0C;
            break;
        }
    }
_5B6D:
    return _17CD;
}

UINT8 _00EE4B87()
{
    U16 filenum;
    UINT8 _17A4[0x0E];
    UINT8 information[0x0A];
    UINT8 _179A[0x0A];
    UINT8 origin = FromTop;
    UINT8 datalength = 0x0E;
    UINT8 filetype = 0x0F;
    U32 filelength = 0x0000000F;
    UINT8 openmode = ReadAndWrite;
    UINT8 filehandle = 0x01;
    U16 filename = 0x0000;
    UINT16 fileoffset = 0x0000;
    UINT8 _8DD9[0x0A] = "alarmweek";
    SysMemcpy(_179A, _8DD9, 0x0A);
    UINT8 _17CD = FileNum(filetype, &filenum);
    for (UINT16 fileorder = 0x0001; fileorder <= filenum; fileorder++)
    {
    _5CA1:
        _17CD = FileSearch(filetype, fileorder, &filename, information);
        if (strcmp((char*)information, (char*)_179A) == 0x0000)
        {
        _5D62:
            _17CD = FileOpen(filename, filetype, openmode, &filehandle, &filelength);
            if (_17CD)
            {
            _5DDE:
                _17CD = FileSeek(filehandle, fileoffset, origin);
                _17CD = FileRead(filehandle, datalength, _17A4);
            }
            _5E57:
            _17CD = FileClose(filehandle);
            break;
        }
    }
_5E70:
    UINT8 _1792[0x08];
    _00ED177F(_1792);
    UINT8 _1791 = _1792[4];
    if (_1791 == 0x00)
    {
        _5EB2:
        _1791 = 0x07;
    }
_5EB8:
    if (_1792[_1791 + 0x07 - 0x02] == 0x01)
    {
    _5EE1:
        return _1792[_1791 - 0x02];
    }
    else
    {
    _5F02:
        return _1792[_1791 + 0x07 - 0x02] - 0x01;
    }
}

UINT8 _00EE4F15()
{
    UINT8 _17C5[0x06];
    UINT8 _17BF[5];
    UINT8 _17BE;
    SysCloseCom();
    SysCursorReadParam(_17BF);
    if (_17BF[4] == 0x01)
    {
    _5F67:
        _17BE = CloseCursor();
    }
_5F76:
    SysSaveScreenEx();
    SysIconAllClear();
    g_RichRemindFinish = 0x00;
    UINT8 _17BB = 0x00;
    MelodyFinishFlag = 0x01;
    UINT8 _8DE3[] = "闹钟 "; // '\xc4\xd6\xd6\xd3\x20'
    SysMemcpy(_17C5, _8DE3, 0x0006);
    UINT8 _17CF = SysGetHour();
    UINT8 _17CE = SysGetMinute();
    UINT8 _17C4 = _00EE4B87();
    SysPlayMelody(_00EE4773());
    SysLcdPartClear(0x14, 0x14, 0x78, 0x28);
    SysRect(0x14, 0x14, 0x78, 0x28);
    SysLine(0x15, 0x29, 0x79, 0x29);
    SysLine(0x16, 0x2A, 0x7A, 0x2A);
    SysLine(0x79, 0x15, 0x79, 0x29);
    SysLine(0x7A, 0x16, 0x7A, 0x2A);
    SysPrintString(0x17, 0x17, _17C5);
    SysAscii(0x3F, 0x17, _17CF / 0x0A + '0');
    SysAscii(0x47, 0x17, _17CF % 0x0A + '0');
    SysAscii(0x4F, 0x17, ':');
    SysAscii(0x57, 0x17, _17CE / 0x0A + '0');
    SysAscii(0x5F, 0x17, _17CE % 0x0A + '0');
    UINT8 _17BD = 0x00;
    UINT8 _17BC = SysGetTimer1Number();
    if (_17BC == 0x00)
    {
    _6259:
        SysTimer1Open(0x32);
        _17BB = 0x01;
    }
_626C:
    if (_17C4 == 0x01)
    {
        _6278:
        while (0x01)
        {
        _627F:
            if (g_RichRemindFinish == 0x01)
            {
            _628A:
                MsgType _17CB = { DICT_WM_COMMAND, CMD_SCR_NESTED };
                GuiPushMsg(&_17CB);
                g_RichRemindFinish = 0x00;
                break;
            }
            else
            {
            _6300:
                if (MelodyFinishFlag == 0x00)
                {
                _630E:
                    _17BD++;
                    if (_17BD == 0x03)
                    {
                        _6325:
                        MsgType _17CB = { DICT_WM_COMMAND, CMD_SCR_NESTED };
                        GuiPushMsg(&_17CB);
                        break;
                    }
                    else
                    {
                    _6396:
                        MelodyFinishFlag = 0x01;
                        SysPlayMelody(_00EE4773());
                    }
                }
                _63A9:
                MsgType _17CB;
                if (GuiGetMsg(&_17CB))
                {
                _63E1:
                    if (_17CB.type == DICT_WM_COMMAND)
                    {
                    _63ED:
                        if (_17CB.param == CMD_RETURN_HOME)
                        {
                        _6408:
                            if (_17BB == 0x01)
                            {
                            _6414:
                                SysTimer1Close();
                            }
                        _641F:
                            SysStopMelody();
                            SysRestoreScreenEx();
                            GuiTimeDayIntRefresh();
                            _17CB.type = DICT_WM_COMMAND;
                            _17CB.param = CMD_RETURN_HOME;
                            GuiPushMsg(&_17CB);
                            return 0xFD;
                        }
                    }
                _64B3:
                    if (_17CB.type == DICT_WM_POWER)
                    {
                    _64BF:
                        if (_17CB.param == PWR_OFF)
                        {
                        _64DA:
                            GuiPushMsg(&_17CB);
                            break;
                        }
                    }
                _6508:
                    if (_17CB.type == DICT_WM_COMMAND)
                    {
                    _6514:
                        if (_17CB.param == CMD_SCR_NESTED)
                        {
                            _652F:
                            _17CB.type = DICT_WM_COMMAND;
                            _17CB.param = CMD_SCR_NESTED;
                            GuiPushMsg(&_17CB);
                            break;
                        }
                    }
                _65A0:
                    if (_17CB.type == DICT_WM_KEY)
                    {
                    _65AC:
                        _17CB.type = DICT_WM_COMMAND;
                        _17CB.param = CMD_SCR_NESTED;
                        GuiPushMsg(&_17CB);
                        break;
                    }
                }
            }
        }
    }
    else
    {
    _6623:
        if (_17C4 == 0x00)
        {
        _6632:
            while (0x01)
            {
            _6639:
                if (g_RichRemindFinish == 0x01)
                {
                    _6644:
                    MsgType _17CB = { DICT_WM_COMMAND, CMD_SCR_NESTED };
                    GuiPushMsg(&_17CB);
                    g_RichRemindFinish = 0x00;
                    break;
                }
                _66BA:
                if (MelodyFinishFlag == 0x00)
                {
                _66C8:
                    MelodyFinishFlag = 0x01;
                    MsgType _17CB = { DICT_WM_COMMAND, CMD_SCR_NESTED };
                    GuiPushMsg(&_17CB);
                    break;
                }
            _673E:
                MsgType _17CB;
                if (GuiGetMsg(&_17CB))
                {
                    _6776:
                    if (_17CB.type == DICT_WM_COMMAND)
                    {
                    _6782:
                        if (_17CB.param == CMD_RETURN_HOME)
                        {
                        _679D:
                            if (_17BB == 0x01)
                            {
                            _67A9:
                                SysTimer1Close();
                            }
                        _67B4:
                            SysStopMelody();
                            SysRestoreScreenEx();
                            GuiTimeDayIntRefresh();
                            _17CB.type = DICT_WM_COMMAND;
                            _17CB.param = CMD_RETURN_HOME;
                            GuiPushMsg(&_17CB);
                            return 0xFD;
                        }
                    }
                    _6848:
                    if (_17CB.type == DICT_WM_POWER)
                    {
                    _6854:
                        if (_17CB.param == PWR_OFF)
                        {
                        _686F:
                            GuiPushMsg(&_17CB);
                            break;
                        }
                    }
                _689D:
                    if (_17CB.type == DICT_WM_COMMAND)
                    {
                    _68A9:
                        if (_17CB.param == CMD_SCR_NESTED)
                        {
                        _68C4:
                            _17CB.type = DICT_WM_COMMAND;
                            _17CB.param = CMD_SCR_NESTED;
                            GuiPushMsg(&_17CB);
                            break;
                        }
                    }
                _6935:
                    if (_17CB.type == DICT_WM_KEY)
                    {
                    _6941:
                        MelodyFinishFlag = 0x01;
                        _17CB.type = DICT_WM_COMMAND;
                        _17CB.param = CMD_SCR_NESTED;
                        GuiPushMsg(&_17CB);
                        break;
                    }
                }
            }
        }
    }
_69BA:
    if (_17BB == 0x01)
    {
    _69C6:
        SysTimer1Close();
    }
_69D1:
    SysStopMelody();
    SysRestoreScreenEx();
    GuiTimeDayIntRefresh();
    if (_17BF[4] == 0x01)
    {
    _69FE:
        _17BE = OpenCursor();
    }
    _6A0D:
    return 0x01;
}

void _00EF799E()
{
    UINT8 _17BB;
    UINT8 _1793[0x0A];
    UINT8 _8EC5[0x0A] = "alarmtype";
    SysMemcpy(_1793, _8EC5, 0x000A);
    UINT8 origin = FromTop;
    UINT8 datalength = 0x02;
    UINT8 filetype = 0x0F;
    U32 filelength = 0x00000003;
    UINT8 openmode = ReadAndWrite;
    UINT8 filehandle = 0x01;
    U16 filename = 0x0000;
    UINT16 fileoffset = 0x0000;
    U16 filenum;
    U8 information[0x0A];
    UINT8 _179D = 0x00;
    UINT8 _179E = 0x00;
    UINT8 _17BA = FileNum(filetype, &filenum);
    for (UINT16 fileorder = 0x0001; fileorder <= filenum; fileorder++)
    {
    _8AEE:
        _17BA = FileSearch(filetype, fileorder, &filename, information);
        if (strcmp((char*)information, (char*)_1793) == 0x0000)
        {
        _8BAF:
            _17BA = FileOpen(filename, filetype, openmode, &filehandle, &filelength);
            if (_17BA)
            {
            _8C2B:
                _17BA = FileSeek(filehandle, fileoffset, origin);
                _17BA = FileRead(filehandle, datalength, &_179D);
                _17BA = FileClose(filehandle);
            }
        _8CB7:
            break;
        }
    }
_8CBD:
    if (_179D == 0x00)
    {
    _8CCC:
        switch (_179E / 0x10)
        {
        case 0x0000: // 8CF6
            _17BB = 0x01;
            break;
        case 0x0001: // 8CFF
            _17BB = 0x03;
            break;
        case 0x0002: // 8D08
            _17BB = 0x05;
            break;
        case 0x0003: // 8D11
            _17BB = 0x07;
            break;
        case 0x0004: // 8D1A
            _17BB = 0x09;
            break;
        case 0x0005: // 8D23
            _17BB = 0x0B;
            break;
        }
    }
    _8D2C:
    if (_179D == 0x50)
    {
        _8D38:
        switch (_179E / 0x10)
        {
        case 0x0000: // 8D62
            _17BB = 0x02;
            break;
        case 0x0001: // 8D6B
            _17BB = 0x04;
            break;
        case 0x0002: // 8D74
            _17BB = 0x06;
            break;
        case 0x0003: // 8D7D
            _17BB = 0x08;
            break;
        case 0x0004: // 8D86
            _17BB = 0x0A;
            break;
        case 0x0005: // 8D8F
            _17BB = 0x0C;
            break;
        }
    }
_8D98:
    SysPlayMelody(_17BB);
}

UINT8 _00EF9952()
{
    UINT8 _17C8[6];
    UINT8 _17AA[0x15];
    UINT8 _179E[0x08];
    UINT8 _1787[0x0F];
    UINT8 _1778[0x0F];
    U8 _176F[5];
    TypeSysIconEnv _1749;
    UINT8 datalength = 0x1E;
    UINT16 openmode = ReadOnly;
    UINT8 _176D = 0x00;
    UINT8 filetype = 0x08;
    SysCloseCom();
    _00ED177F(_179E);
    UINT16 _179C = 0x0100 * _179E[0] + _179E[1];
    UINT8 _1799 = _179E[2];
    UINT8 _1798 = _179E[3];
    UINT8 _1797 = _179E[5];
    UINT8 _1796 = _179E[6];
    _17C8[0] = _179C;
    _17C8[1] = _179C >> 0x0008;
    _17C8[2] = _1799;
    _17C8[3] = _1798;
    _17C8[4] = _1797;
    _17C8[5] = _1796;
    SysIconAllSave(&_1749);
    SysCursorReadParam(_176F);
    UINT8 _1777 = CloseCursor();
    SysSaveScreenEx();
    SysIconAllClear();
    UINT8 _176E = SysGetTimer1Number();
    if (_176E == 0x00)
    {
    _6B90:
        SysTimer1Open(0x32);
        _176D = 0x01;
    }
_6BA3:
    U16 filenum;
    U16 filename;
    U8 information[10];
    FileNum(filetype, &filenum);
    for (UINT16 fileorder = 0x0001; fileorder <= filenum; fileorder++)
    {
    _6C26:
        FileSearch(filetype, fileorder, &filename, information);
        if ((_17C8[0] == information[2]) && (_17C8[1] == information[3]) && (_17C8[2] == information[4])
            && (_17C8[3] == information[5]) && (0x01 == information[6]) &&  (_17C8[4] == information[7]) && (_17C8[5] == information[8]))
        {
        _6D31:
            U8 filehandle;
            U32 filelength;
            SysIconAllClear();
            FileOpen(filename, filetype, openmode, &filehandle, &filelength);
            FileRead(filehandle, datalength, _17AA);
            FileClose(filehandle);
            UINT16 _17CE = _17AA[1] * 0x0100;
            UINT16 _179A = _17AA[0] + _17CE;
            _1778[0x00] = (_179A / 0x0A) % 0x0A + '0';
            _1778[0x01] = _179A  % 0x0A + '0';
            _1778[0x02] = '/';
            _1778[0x03] = (_17AA[2] / 0x0A) % 0x0A + '0';
            _1778[0x04] = _17AA[2] % 0x0A + '0';
            _1778[0x05] = '/';
            _1778[0x06] = (_17AA[3] / 0x0A) % 0x0A + '0';
            _1778[0x07] = _17AA[3] % 0x0A + '0';
            _1778[0x08] = ' ';
            _1778[0x09] = (_17AA[4] / 0x0A) % 0x0A + '0';
            _1778[0x0A] = _17AA[4] % 0x0A + '0';
            _1778[0x0B] = ':';
            _1778[0x0C] = (_17AA[5] / 0x0A) % 0x0A + '0';
            _1778[0x0D] = _17AA[5] % 0x0A + '0';
            _1778[0x0E] = '\0';
            for (UINT8 _17A9 = 0x00; _17A9 + 0x01 < 0x0F; _17A9++)
            {
            _710F:
                if (_17AA[0x06 + _17A9] == 0x00)
                {
                _7138:
                    _17AA[0x06 + _17A9] = ' ';
                }
                _7169:
                _1787[_17A9] = _17AA[0x06 + _17A9];
            }
            _71C1:
            _1787[0x0D] = 0x00;
            SysLcdPartClear(0x00, 0x00, 0x9E, 0x5F);
            SysPrintString(0x18, 0x24, _1778);
            SysPrintString(0x38, 0x34, _1787);
            UINT8 _89AA[9] = "日程提醒";
            SysMemcpy(_1778, _89AA, 0x0009);
            SysPrintString(0x2C, 0x10, _1778);
            UINT8 _89B3[5] = "内容";
            SysMemcpy(_1778, _89B3, 0x0005);
            SysPrintString(0x10, 0x34, _1778);
            SysLine(0x34, 0x45, 0x90, 0x45);
            MelodyFinishFlag = 0x01;
            _00EF799E();
            for (UINT8 _17A8 = 0x00; _17A8 != 0x1E; _17A8++)
            {
            _73B6:
                if (MelodyFinishFlag)
                {
                    MsgType _1774;
                _73C7:
                    if (GuiGetMsg(&_1774))
                    {
                    _73FF:
                        if (((_1774.type == DICT_WM_COMMAND) && (_1774.param == CMD_RETURN_HOME))
                            || ((_1774.type == DICT_WM_POWER) && (_1774.param == PWR_OFF)))
                        {
                            _744D:
                            SysStopMelody();
                            SysRestoreScreenEx();
                            GuiTimeDayIntRefresh();
                            if (_176D == 0x01)
                            {
                            _747A:
                                SysTimer1Close();
                            }
                            _7485:
                            GuiPushMsg(&_1774);
                            return 0xFD;
                        }
                        _74B5:
                        if (_1774.type == DICT_WM_COMMAND)
                        {
                        _74C1:
                            if (_1774.param == CMD_SCR_NESTED)
                            {
                            _74DC:
                                GuiPushMsg(&_1774);
                                SysStopMelody();
                                SysRestoreScreenEx();
                                GuiTimeDayIntRefresh();
                                if (_176D == 0x01)
                                {
                                _7534:
                                    SysTimer1Close();
                                }
                            _753F:
                                return 0x01;
                            }
                        }
                        _7547:
                        if (_1774.type == DICT_WM_KEY)
                        {
                        _7553:
                            if (_1774.param == '.')
                            {
                            _756E:
                                SysStopMelody();
                                SysRestoreScreenEx();
                                GuiTimeDayIntRefresh();
                                if (_176F[4] == 0x01)
                                {
                                    _759B:
                                    _1777 = OpenCursor();
                                }
                                _75AA:
                                if (_176D == 0x01)
                                {
                                _75B6:
                                    SysTimer1Close();
                                }
                                _75C1:
                                _1774.type = DICT_WM_COMMAND;
                                _1774.param = CMD_SCR_NESTED;
                                GuiPushMsg(&_1774);
                                return 0x01;
                            }
                        }
                    }
                }
            }
        }
    }
_763D:
    g_RichRemindFinish = 0x01;
    SysStopMelody();
    SysRestoreScreenEx();
    GuiTimeDayIntRefresh();
    if (_176F[4] == 0x01)
    {
    _766F:
        _1777 = OpenCursor();
    }
_767E:
    if (_176D == 0x01)
    {
    _768A:
        SysTimer1Close();
    }
_7695:
    MsgType _1774 = { DICT_WM_COMMAND,CMD_SCR_NESTED };
    GuiPushMsg(&_1774);
    return 0x01;
}

// 00F0009C - 00F001F8
/*
  ████████                                                                    █      ██████████      █████████            █
  █            █                                                      █████████    █    █    █    █            █                        █
  █            █                                            █                              █    █    █    █            █                        █
  █            █                              █████████                            █    █    █    █            █              ███████████
  ████████                      █                                                    █    █    █    █      ████████
  █            █    ███████████                              ███████      █    █    █    █            █      █            █    █
  █            █                                                                            █  █        ███            █      █            █      █
  █            █                                                                            ██              █          █        █          █          █
  █            █                                                                            █                █          █        █          █          █
  ████████                                                                      █    ██████████          █        █        █              █
  █            █                            ███████████  ███████████  █                █    ███████████  █                █


              █                    ████                ████                █    █                ████                ████                ████
              █                          █                      █                █    █                █                      █                            █
              █                          █                      █                █    █                █                      █                            █
              █                          █                      █                █    █                █                      █                            █
              █                    ████                ████                ████                ████                ████                      █
              █                    █                            █                      █                      █                █    █                      █
              █                    █                            █                      █                      █                █    █                      █
              █                    █                            █                      █                      █                █    █                      █
              █                    ████                ████                      █                ████                ████                      █




            ████                ████          █    ████          █        █            █    ████          █    ████          █    █    █
            █    █                █    █          █    █    █          █        █            █          █          █          █          █    █    █
            █    █                █    █          █    █    █          █        █            █          █          █          █          █    █    █
            █    █                █    █          █    █    █          █        █            █          █          █          █          █    █    █
            ████                ████          █    █    █          █        █            █    ████          █    ████          █    ████
            █    █                      █          █    █    █          █        █            █    █                █          █          █          █
            █    █                      █          █    █    █          █        █            █    █                █          █          █          █
            █    █                      █          █    █    █          █        █            █    █                █          █          █          █
            ████                ████          █    ████          █        █            █    ████          █    ████          █          █




      █    ████          █    ████          █    ████          █    ████          █    ████      ████  ████          ████    █
      █    █                █    █                █          █          █    █    █          █    █    █            █  █    █                █    █
      █    █                █    █                █          █          █    █    █          █    █    █            █  █    █                █    █
      █    █                █    █                █          █          █    █    █          █    █    █            █  █    █                █    █
      █    ████          █    ████          █          █          █    ████          █    ████      ████  █    █          ████    █
      █          █          █    █    █          █          █          █    █    █          █          █      █        █    █          █          █
      █          █          █    █    █          █          █          █    █    █          █          █      █        █    █          █          █
      █          █          █    █    █          █          █          █    █    █          █          █      █        █    █          █          █
      █    ████          █    ████          █          █          █    ████          █    ████      ████  ████          ████    █




  ████  ████      ████  ████      ████  █    █      ████  ████      ████  ████      ████  ████      ████  ████
        █        █            █        █            █  █    █            █  █                  █  █                  █        █            █  █    █
        █        █            █        █            █  █    █            █  █                  █  █                  █        █            █  █    █
        █        █            █        █            █  █    █            █  █                  █  █                  █        █            █  █    █
  ████  ████      ████  ████      ████  ████      ████  ████      ████  ████      ████        █      ████  ████
  █        █            █              █      █              █      █              █      █        █    █      █              █      █        █    █
  █        █            █              █      █              █      █              █      █        █    █      █              █      █        █    █
  █        █            █              █      █              █      █              █      █        █    █      █              █      █        █    █
  ████  ████      ████  ████      ████        █      ████  ████      ████  ████      ████        █      ████  ████
*/
// 屏幕显示2月份第一天对应不同星期的情况
void _00F0009C(UINT8 _17CF)
{
    U8 _7918[0x0339*7] = { 0x7F,0x80,0x00,0x00,0x00,0x11,0xFF,0x8F,0xF8,0x10,0x00,0x40,0x80,0x00,0x00,0x0F,0xF9,0x24,0x81,0x00,0x08,0x00,0x40,0x80,0x00,0x01,0x00,0x01,0x24,0x81,0x00,0x08,0x00,0x40,0x80,0x00,0xFF,0x80,0x01,0x24,0x81,0x01,0xFF,0xC0,0x7F,0x80,0x08,0x00,0x00,0x01,0x24,0x8F,0xF0,0x00,0x00,0x40,0x9F,0xFC,0x00,0x07,0xF1,0x24,0x81,0x10,0x24,0x00,0x40,0x80,0x00,0x00,0x00,0x01,0x43,0x81,0x10,0x22,0x00,0x40,0x80,0x00,0x00,0x00,0x01,0x80,0x82,0x10,0x41,0x00,0x40,0x80,0x00,0x00,0x00,0x01,0x00,0x82,0x10,0x41,0x00,0x7F,0x80,0x00,0x00,0x00,0x09,0xFF,0x82,0x10,0x80,0x80,0x40,0x80,0x01,0xFF,0xDF,0xFD,0x00,0x9F,0xFD,0x00,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x00,0x3C,0x03,0xC0,0x24,0x03,0xC0,0x3C,0x03,0xC0,0x01,0x00,0x04,0x00,0x40,0x24,0x02,0x00,0x20,0x00,0x40,0x01,0x00,0x04,0x00,0x40,0x24,0x02,0x00,0x20,0x00,0x40,0x01,0x00,0x04,0x00,0x40,0x24,0x02,0x00,0x20,0x00,0x40,0x01,0x00,0x3C,0x03,0xC0,0x3C,0x03,0xC0,0x3C,0x00,0x40,0x01,0x00,0x20,0x00,0x40,0x04,0x00,0x40,0x24,0x00,0x40,0x01,0x00,0x20,0x00,0x40,0x04,0x00,0x40,0x24,0x00,0x40,0x01,0x00,0x20,0x00,0x40,0x04,0x00,0x40,0x24,0x00,0x40,0x01,0x00,0x3C,0x03,0xC0,0x04,0x03,0xC0,0x3C,0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x03,0xC0,0x3C,0x13,0xC1,0x08,0x13,0xC1,0x3C,0x12,0x40,0x02,0x40,0x24,0x12,0x41,0x08,0x10,0x41,0x04,0x12,0x40,0x02,0x40,0x24,0x12,0x41,0x08,0x10,0x41,0x04,0x12,0x40,0x02,0x40,0x24,0x12,0x41,0x08,0x10,0x41,0x04,0x12,0x40,0x03,0xC0,0x3C,0x12,0x41,0x08,0x13,0xC1,0x3C,0x13,0xC0,0x02,0x40,0x04,0x12,0x41,0x08,0x12,0x01,0x04,0x10,0x40,0x02,0x40,0x04,0x12,0x41,0x08,0x12,0x01,0x04,0x10,0x40,0x02,0x40,0x04,0x12,0x41,0x08,0x12,0x01,0x04,0x10,0x40,0x03,0xC0,0x3C,0x13,0xC1,0x08,0x13,0xC1,0x3C,0x10,0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x13,0xC1,0x3C,0x13,0xC1,0x3C,0x13,0xC7,0xBC,0x1E,0x40,0x12,0x01,0x20,0x10,0x41,0x24,0x12,0x40,0xA4,0x02,0x40,0x12,0x01,0x20,0x10,0x41,0x24,0x12,0x40,0xA4,0x02,0x40,0x12,0x01,0x20,0x10,0x41,0x24,0x12,0x40,0xA4,0x02,0x40,0x13,0xC1,0x3C,0x10,0x41,0x3C,0x13,0xC7,0xA4,0x1E,0x40,0x10,0x41,0x24,0x10,0x41,0x24,0x10,0x44,0x24,0x10,0x40,0x10,0x41,0x24,0x10,0x41,0x24,0x10,0x44,0x24,0x10,0x40,0x10,0x41,0x24,0x10,0x41,0x24,0x10,0x44,0x24,0x10,0x40,0x13,0xC1,0x3C,0x10,0x41,0x3C,0x13,0xC7,0xBC,0x1E,0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x7B,0xC7,0xBC,0x7A,0x47,0xBC,0x7B,0xC7,0xBC,0x7B,0xC0,0x08,0x40,0x84,0x0A,0x40,0xA0,0x0A,0x00,0x84,0x0A,0x40,0x08,0x40,0x84,0x0A,0x40,0xA0,0x0A,0x00,0x84,0x0A,0x40,0x08,0x40,0x84,0x0A,0x40,0xA0,0x0A,0x00,0x84,0x0A,0x40,0x7B,0xC7,0xBC,0x7B,0xC7,0xBC,0x7B,0xC7,0x84,0x7B,0xC0,0x42,0x04,0x04,0x40,0x44,0x04,0x42,0x44,0x04,0x42,0x40,0x42,0x04,0x04,0x40,0x44,0x04,0x42,0x44,0x04,0x42,0x40,0x42,0x04,0x04,0x40,0x44,0x04,0x42,0x44,0x04,0x42,0x40,0x7B,0xC7,0xBC,0x78,0x47,0xBC,0x7B,0xC7,0x84,0x7B,0xC0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x7F,0x80,0x00,0x00,0x00,0x11,0xFF,0x8F,0xF8,0x10,0x00,0x40,0x80,0x00,0x00,0x0F,0xF9,0x24,0x81,0x00,0x08,0x00,0x40,0x80,0x00,0x01,0x00,0x01,0x24,0x81,0x00,0x08,0x00,0x40,0x80,0x00,0xFF,0x80,0x01,0x24,0x81,0x01,0xFF,0xC0,0x7F,0x80,0x08,0x00,0x00,0x01,0x24,0x8F,0xF0,0x00,0x00,0x40,0x9F,0xFC,0x00,0x07,0xF1,0x24,0x81,0x10,0x24,0x00,0x40,0x80,0x00,0x00,0x00,0x01,0x43,0x81,0x10,0x22,0x00,0x40,0x80,0x00,0x00,0x00,0x01,0x80,0x82,0x10,0x41,0x00,0x40,0x80,0x00,0x00,0x00,0x01,0x00,0x82,0x10,0x41,0x00,0x7F,0x80,0x00,0x00,0x00,0x09,0xFF,0x82,0x10,0x80,0x80,0x40,0x80,0x01,0xFF,0xDF,0xFD,0x00,0x9F,0xFD,0x00,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x10,0x03,0xC0,0x3C,0x02,0x40,0x3C,0x03,0xC0,0x00,0x00,0x10,0x00,0x40,0x04,0x02,0x40,0x20,0x02,0x00,0x00,0x00,0x10,0x00,0x40,0x04,0x02,0x40,0x20,0x02,0x00,0x00,0x00,0x10,0x00,0x40,0x04,0x02,0x40,0x20,0x02,0x00,0x00,0x00,0x10,0x03,0xC0,0x3C,0x03,0xC0,0x3C,0x03,0xC0,0x00,0x00,0x10,0x02,0x00,0x04,0x00,0x40,0x04,0x02,0x40,0x00,0x00,0x10,0x02,0x00,0x04,0x00,0x40,0x04,0x02,0x40,0x00,0x00,0x10,0x02,0x00,0x04,0x00,0x40,0x04,0x02,0x40,0x00,0x00,0x10,0x03,0xC0,0x3C,0x00,0x40,0x3C,0x03,0xC0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x03,0xC0,0x3C,0x03,0xC1,0x3C,0x10,0x81,0x3C,0x13,0xC0,0x00,0x40,0x24,0x02,0x41,0x24,0x10,0x81,0x04,0x10,0x40,0x00,0x40,0x24,0x02,0x41,0x24,0x10,0x81,0x04,0x10,0x40,0x00,0x40,0x24,0x02,0x41,0x24,0x10,0x81,0x04,0x10,0x40,0x00,0x40,0x3C,0x03,0xC1,0x24,0x10,0x81,0x3C,0x13,0xC0,0x00,0x40,0x24,0x00,0x41,0x24,0x10,0x81,0x20,0x10,0x40,0x00,0x40,0x24,0x00,0x41,0x24,0x10,0x81,0x20,0x10,0x40,0x00,0x40,0x24,0x00,0x41,0x24,0x10,0x81,0x20,0x10,0x40,0x00,0x40,0x3C,0x03,0xC1,0x3C,0x10,0x81,0x3C,0x13,0xC0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x12,0x41,0x3C,0x13,0xC1,0x3C,0x13,0xC1,0x3C,0x7B,0xC0,0x12,0x41,0x20,0x12,0x01,0x04,0x12,0x41,0x24,0x0A,0x40,0x12,0x41,0x20,0x12,0x01,0x04,0x12,0x41,0x24,0x0A,0x40,0x12,0x41,0x20,0x12,0x01,0x04,0x12,0x41,0x24,0x0A,0x40,0x13,0xC1,0x3C,0x13,0xC1,0x04,0x13,0xC1,0x3C,0x7A,0x40,0x10,0x41,0x04,0x12,0x41,0x04,0x12,0x41,0x04,0x42,0x40,0x10,0x41,0x04,0x12,0x41,0x04,0x12,0x41,0x04,0x42,0x40,0x10,0x41,0x04,0x12,0x41,0x04,0x12,0x41,0x04,0x42,0x40,0x10,0x41,0x3C,0x13,0xC1,0x04,0x13,0xC1,0x3C,0x7B,0xC0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x79,0x07,0xBC,0x7B,0xC7,0xA4,0x7B,0xC7,0xBC,0x7B,0xC0,0x09,0x00,0x84,0x08,0x40,0xA4,0x0A,0x00,0xA0,0x08,0x40,0x09,0x00,0x84,0x08,0x40,0xA4,0x0A,0x00,0xA0,0x08,0x40,0x09,0x00,0x84,0x08,0x40,0xA4,0x0A,0x00,0xA0,0x08,0x40,0x79,0x07,0xBC,0x7B,0xC7,0xBC,0x7B,0xC7,0xBC,0x78,0x40,0x41,0x04,0x20,0x40,0x44,0x04,0x40,0x44,0x24,0x40,0x40,0x41,0x04,0x20,0x40,0x44,0x04,0x40,0x44,0x24,0x40,0x40,0x41,0x04,0x20,0x40,0x44,0x04,0x40,0x44,0x24,0x40,0x40,0x79,0x07,0xBC,0x7B,0xC7,0x84,0x7B,0xC7,0xBC,0x78,0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x7B,0xC0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0A,0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0A,0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0A,0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x7B,0xC0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x42,0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x42,0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x42,0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x7B,0xC0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 };
    SysMemInit(0x2C00, 0x1400);
    U8* _17CB = (U8*)SysMemAllocate(0x0339);
    U8* _17CD = _7918 + _17CF * 0x0339;
    SysMemcpy(_17CB, _17CD, 0x0339);
    SysPicture(0x4A, 0x12, 0x9C, 0x5C, _17CB, 0x00);
    SysMemFree((char*)_17CB);
}

// 00F04000 - 
// 接收资料 APP 入口
UINT8 _00F04000()
{
    U8 _A6CD[] = "  ====下载资料====  ";
    MCU_memory[0x1B4D] = 0x00;
    SysPrintString(0x00, 0x00, _A6CD);
    return _00F040A2();
}

// 00F04036 - 00F0406B
// 资料备份 APP 入口
UINT8 _00F04036()
{
    U8 _A6E2[] = "  ====备份资料====  ";
    MCU_memory[0x1B4D] = 0x01;
    SysPrintString(0x00, 0x00, _A6E2);
    return _00F040A2();
}

// 00F0406C - 00F040A1
// 资料资料 APP 入口
UINT8 _00F0406C()
{
    U8 _A6F7[] = "  ====恢复资料====  ";
    MCU_memory[0x1B4D] = 0x02;
    SysPrintString(0x00, 0x00, _A6F7);
    return _00F040A2();
}

// 00F040A2 - 00F04327
UINT8 _00F040A2()
{
    U8* _1B4E;
    U8 _A600[] = "正在连接...";
    U8 _A624[] = "初始化串口失败!";
    U8 _A634[] = "线路连接失败!";
    U8 _A6AF[] = "错误的通讯模式!";
    GuiInit();
    FlashInit();
    GuiSetKbdType(0x02);
    GuiSetInputFilter(0x02);
    SysIconAllClear();
    SysLcdPartClear(0x00, 0x10, 0x9E, 0x5F);
    SysPrintString(0x20, 0x18, _A600);
    *(UINT16*)(MCU_memory + 0x1B3E) = 0x1ABB;
    *(UINT16*)(MCU_memory + 0x1AB2) = 0x1AC1;
    *(UINT16*)(MCU_memory + 0x1B56) = 0x1AD3;
    MCU_memory[0x1B40] = 0x01;
    MCU_memory[0x1B58] = 0x01;
    if (SysOpenCom(0x00, 0x04, 0x00) == 0x00)
    {
    _51EB:
        _1B4E = _A624;
        MCU_memory[0x1B40] = 0x00;
    }
_5202:
    if (MCU_memory[0x1B40] == 0x01)
    {
    _520D:
        MCU_memory[0x1B44] = 0x09;
        MCU_memory[0x1B4C] = 0x1E;
        if (_00F04846() != 0x01)
        {
        _5222:
            _1B4E = _A634;
            MCU_memory[0x1B40] = 0x00;
        }
    }
    _5239:
    if (MCU_memory[0x1B40] == 0x01)
    {
    _5244:
        SysWriteCom(0x01, &MCU_memory[0x1B40]);
        MCU_memory[0x1AAE] = MCU_memory[0x1AC0];
        MCU_memory[0x1B45] = MCU_memory[0x1AC3];
        MCU_memory[0x1B4C] = 0x03;
        if (MCU_memory[0x1B4D] != MCU_memory[0x1AAE])
        {
            _5281:
            _1B4E = _A6AF;
            MCU_memory[0x1B40] = 0x00;
        }
    }
_5298:
    MCU_memory[0x1B58] = 0x00;
    if (MCU_memory[0x1B40] == 0x01)
    {
    _52A8:
        if (MCU_memory[0x1AAE] != 0x01)
        {
        _52B3:
            _00F04328();
        }
        else
        {
        _52B9:
            _00F04B29();
        }
    }
_52BC:
    SysCloseCom();
    GuiMsgBox(_1B4E, 0x0064);
    if (MCU_memory[0x1B4D] == 0x02)
    {
    _5305:
        _00EDBD1F();
    }
_5310:
    return 0x01;
}

// 00F04328 - 00F04845
UINT8 _00F04328(U8* _17D0) // todo _1B4E 是全局变量
{
    U8 _A6BF[] = "不兼容的版本!";
    U8 _A60C[] = "正在接收...";
    U8 _A67A[] = "存储器空间不足!";
    U8 _A68A[] = "存储器碎片太多,请整理碎片后重新下载!";
    U8* _1B4E; // todo 全局变量？
    MCU_memory[0x1B46] = 0x00;
    while (MCU_memory[0x1B46] < MCU_memory[0x1B45])
    {
    _5349:
        MCU_memory[0x1B44] = 0x54;
        if (_00F04846() != 0x01)
        {
        _5359:
            return 0x00;
        }
    _535E:
        if (_00F050DC(MCU_memory+0x1ACF, *(UINT16*)(MCU_memory + *(UINT16*)(MCU_memory + 0x1B56))))
        {
        _53B4:
            _1B4E = _A6BF;
            return 0x00;
        }
    _53CB:
        MCU_memory[0x1B44] = 0x80;
        SysPrintString(0x20, 0x18, _A60C);
        if (MCU_memory[0x1AAE] == 0x00)
        {
        _5405:
            FileFreeSector((U16*)(MCU_memory + 0x1AB0));
            if (*(UINT16*)(MCU_memory + 0x1AB0) < (*(UINT32*)(MCU_memory + *(UINT16*)(MCU_memory + 0x1AB2)) >> 0x0000000C))
            {
            _545D:
                _1B4E = _A67A;
                return 0x00;
            }
        _5474:
            MCU_memory[0x1B50] = 0x1AD5;
            if (MCU_memory[0x1AC0] == 0x3F || MCU_memory[0x1AC0] == 0x3A || MCU_memory[0x1AC0] == 0x2B || MCU_memory[0x1AC0] == 0x2C)
            {
            _54C8:
                MCU_memory[0x1B50] = 0x1AC5;
            }
        _54F0:
            UINT32 _17CC = *(UINT32*)(MCU_memory + *(UINT16*)(MCU_memory + 0x1AB2));
            if (FileCreat(MCU_memory[0x1AC0], _17CC, MCU_memory + MCU_memory[0x1B50], (U16*)(MCU_memory + 0x1AB9), MCU_memory + 0x1AB8) == 0x00)
            {
            _558B:
                _1B4E = _A68A;
                return 0x00;
            }
        _55A2:
            SysLcdPartClear(0x00, 0x30, 0x9E, 0x5F);
            MCU_memory[0x1A5F] = 0x00;
            SysPrintString(0x10, 0x30, MCU_memory + 0x1AD5);
        }
        else
        {
        _5632:
            ResetFlash();
            FileFlashStartAdr((U32*)(MCU_memory + 0x1B52));
        }
    _5663:
        SysWriteCom(0x01, MCU_memory + 0x1B40);
        MCU_memory[0x1AAF] = 0x00;
        while (0x01)
        {
        _568F:
            _00F04846();
            if (MCU_memory[0x1B40] == 0x01)
            {
            _569D:
                MCU_memory[0x1AAF] = 0x00;
                if (MCU_memory[0x1AAE] == 0x00)
                {
                _56AA:
                    FileWrite(MCU_memory[0x1AB8], MCU_memory[0x1AC0], MCU_memory + 0x1AC1);
                }
                else
                {
                _56FA:
                    FileRestoreFlash(MCU_memory[0x1AC0], MCU_memory + 0x1AC1, (U32*)(MCU_memory + 0x1B52));
                }
            _574C:
                SysWriteCom(0x01, MCU_memory + 0x1B40);
                if (MCU_memory[0x1ABF] != 0x04)
                {
                _5777:
                    continue;
                }
                else
                {
                    _577D:
                    if (MCU_memory[0x1AAE] == 0x00)
                    {
                    _5785:
                        MCU_memory[0x1B46]++;
                        FileClose(MCU_memory[0x1AB8]);
                        break;
                    }
                    else
                    {
                    _57A2:
                        _00F2702E();
                        return 0x01;
                    }
                }
            }
            else if (MCU_memory[0x1B40] == 0x00)
            {
            _57BD:
                SysWriteCom(0x01, MCU_memory + 0x1B40);
                MCU_memory[0x1AAF]++;
                if (MCU_memory[0x1AAF] < 0x05)
                {
                _57F1:
                    continue;
                }
            }
        _57F4:
            if (MCU_memory[0x1AAE] == 0x00)
            {
            _57FC:
                FileDel(MCU_memory[0x1AB8]);
            }
            else
            {
            _580D:
                ResetFlash();
                _00F2702E();
            }
        _5823:
            return 0x00;
        }
    }
_582E:
    return 0x01;
}

// 00F04846 - 00F04B28
UINT8 _00F04846()
{
    MCU_memory[0x1B3B] = 0x00;
    MCU_memory[0x1B43] = 0x00;
    *(UINT16*)(MCU_memory + 0x1B4E) = 0xA64C;
    MCU_memory[0x1B40] = 0x01;
    SysTimer1Open(0x64);
    PtrMsg _1AAB = PtrMsg(MCU_memory + 0x1AAB);
    while (0x01)
    {
    _588B:
        if (GuiGetMsg(_1AAB) == 0x00)
        {
            continue;
        }
    _58BE:
        if (_1AAB->type == 0x07)
        {
            _58C9:
            MCU_memory[0x1B43] = 0x00;
            MCU_memory[0x1B42] = MCU_memory[0x1B44] - MCU_memory[0x1B3B];
            if (SysReadCom(MCU_memory+MCU_memory[0x1B3B] + 0x1ABB, &MCU_memory[0x1B42]) >= 0x01)
            {
                _592F:
                *(UINT16*)(MCU_memory + 0x1B4E) = 0xA642;
                MCU_memory[0x1B40] = 0x00;
                break;
            }
            else
            {
            _5949:
                MCU_memory[0x1B3B] += MCU_memory[0x1B42];
                if (MCU_memory[0x1B3B] < MCU_memory[0x1B44])
                {
                _595F:
                    continue;
                }
            _5962:
                if (MCU_memory[0x1B44] == 0x01)
                {
                    _596D:
                    MCU_memory[0x1B40] = MCU_memory[0x1ABB];
                    if (MCU_memory[0x1B40] == 0x00)
                    {
                        _597B:
                        *(UINT16*)(MCU_memory + 0x1B4E) = 0xA642;
                    }
                    break;
                }
                _5990:
                *(UINT16*)(MCU_memory + 0x1B3C) = 0x0000;
                for (MCU_memory[0x1B41] = 0x04; MCU_memory[0x1B41] < MCU_memory[0x1B3B]; MCU_memory[0x1B41]++)
                {
                _59B8:
                    *(UINT16*)(MCU_memory + 0x1B3C) += MCU_memory[MCU_memory[0x1B41] + 0x1ABB];
                }
            _59F4:
                if (*(UINT16*)(MCU_memory + 0x1B3C) == *(UINT16*)(MCU_memory + *(UINT16*)(MCU_memory + 0x1B3E)))
                {
                    _5A23:
                    MCU_memory[0x1B40] = 0x01;
                }
                else
                {
                    _5A2B:
                    *(UINT16*)(MCU_memory + 0x1B4E) = 0xA656;
                    MCU_memory[0x1B40] = 0x00;
                }
                break;
            }
        }
        else if (_1AAB->type == 0x06)
        {
        _5A53:
            MCU_memory[0x1B43]++;
            if (MCU_memory[0x1B43] < MCU_memory[0x1B4C])
            {
            _5A68:
                continue;
            }
            else
            {
                _5A6E:
                *(UINT16*)(MCU_memory + 0x1B4E) = 0xA662;
                MCU_memory[0x1B40] = 0x03;
                break;
            }
        }
        else if ((_1AAB->type == 0x01 && 0x002E == _1AAB->param) || (_1AAB->type == 0x0A && 0x0003 == _1AAB->param))
        {
        _5AD5:
            if (MCU_memory[0x1B4D] != 0x02 || MCU_memory[0x1B58])
            {
                _5AE8:
                *(UINT16*)(MCU_memory + 0x1B4E) = 0xA66C;
                MCU_memory[0x1B40] = 0x02;
                break;
            }
        }
    }
_5B05:
    SysTimer1Close();
    return MCU_memory[0x1B40];
}

// 00F04B29 - 00F050DB
UINT8 _00F04B29()
{
    MCU_memory[0x1B44] = 0x01;
    FlashCapacity((U32*)(MCU_memory + 0x1AB4));
    MCU_memory[0x1ABD] = 0x00;
    MCU_memory[0x1ABE] = 0x00;
    MCU_memory[0x1ABF] = 0x02;
    MCU_memory[0x1AC0] = 0x50;
    *(UINT32*)(MCU_memory + 0x1AC1) = *(UINT32*)(MCU_memory + 0x1AB4);
    *(UINT16*)(MCU_memory + 0x1B3C) = 0x0000;
    for (MCU_memory[0x1B41] = 0x04; MCU_memory[0x1B41] < 0x54; MCU_memory[0x1B41]++)
    {
    _5C00:
        *(UINT16*)(MCU_memory + 0x1B3C) += MCU_memory[0x1ABB + MCU_memory[0x1B41]];
    }
_5C3C:
    *(UINT16*)(MCU_memory + *(UINT16*)(MCU_memory + 0x1B3E)) = *(UINT16*)(MCU_memory + 0x1B3C);
    SysWriteCom(0x54, MCU_memory + 0x1ABB);
    if (_00F04846() != 0x01)
    {
    _5C8E:
        return 0x00;
    }
_5C93:
    U8 _A618[] = "正在发送...";
    SysPrintString(0x20, 0x18, _A618);
    MCU_memory[0x1ABF] = 0x03;
    MCU_memory[0x1AC0] = 0x7A;
    *(UINT16*)(MCU_memory + 0x1B47) = *(UINT32*)(MCU_memory + 0x1AB4) / 0x0000007A;
    MCU_memory[0x1B4B] = *(UINT32*)(MCU_memory + 0x1AB4) % 0x0000007A;
    FileFlashStartAdr((U32*)(MCU_memory + 0x1B52));
    *(UINT16*)(MCU_memory + 0x1B49) = 0x0000;
    while (*(UINT16*)(MCU_memory + 0x1B49) < *(UINT16*)(MCU_memory + 0x1B47))
    {
    _5D6F:
        FileBackupFlash(0x7A, MCU_memory + 0x1AC1, (U32*)(MCU_memory + 0x1B52));
        *(UINT16*)(MCU_memory + 0x1B3C) = 0x0000;
        for (MCU_memory[0x1B41] = 0x04; MCU_memory[0x1B41] < 0x0080; MCU_memory[0x1B41]++)
        {
            _5DED:
            *(UINT16*)(MCU_memory + 0x1B3C) += MCU_memory[0x1ABB + MCU_memory[0x1B41]];
        }
        _5E29:
        *(UINT16*)(MCU_memory + *(UINT16*)(MCU_memory + 0x1B3E)) = *(UINT16*)(MCU_memory + 0x1B3C);
        MCU_memory[0x1AAF] = 0x00;
        while (0x01)
        {
        _5E5C:
            SysWriteCom(0x80, MCU_memory + 0x1ABB);
            if (_00F04846() == 0x01)
            {
            _5E8F:
                *(UINT16*)(MCU_memory + 0x1B49) += 0x0001;
                MCU_memory[0x1AAF] = 0x00;
                break;
            }
            else
            {
            _5EBB:
                if (MCU_memory[0x1B40] == 0x00)
                {
                _5EC3:
                    MCU_memory[0x1AAF]++;
                    if (MCU_memory[0x1AAF] < 0x05)
                    {
                        _5ED7:
                        *(UINT16*)(MCU_memory + *(UINT16*)(MCU_memory + 0x1B3E)) = *(UINT16*)(MCU_memory + 0x1B3C);
                        continue;
                    }
                    else
                    {
                    _5F01:
                        return 0x00;
                    }
                }
                else
                {
                _5F09:
                    return 0x00;
                }
            }
        }
    }
_5F14:
    MCU_memory[0x1ABF] = 0x04;
    MCU_memory[0x1AC0] = MCU_memory[0x1B4B];
    FileBackupFlash(MCU_memory[0x1B4B], MCU_memory + 0x1AC1, (U32*)(MCU_memory + 0x1B52));
    *(UINT16*)(MCU_memory + 0x1B3C) = 0x0000;
    MCU_memory[0x1B4B] += 0x04;
    for (MCU_memory[0x1B41] = 0x04; MCU_memory[0x1B41] < 0x0080; MCU_memory[0x1B41]++)
    {
        _5FC9:
        *(UINT16*)(MCU_memory + 0x1B3C) += MCU_memory[0x1ABB + MCU_memory[0x1B41]];
    }
    _6005:
    *(UINT16*)(MCU_memory + *(UINT16*)(MCU_memory + 0x1B3E)) = *(UINT16*)(MCU_memory + 0x1B3C);
    MCU_memory[0x1AAF] = 0x00;
    while (0x01)
    {
    _6038:
        SysWriteCom(0x80, MCU_memory + 0x1ABB);
        if (_00F04846() == 0x01)
        {
        _606B:
            return 0x01;
        }
        else
        {
        _6073:
            if (MCU_memory[0x1B40] == 0x00)
            {
                _607B:
                MCU_memory[0x1AAF]++;
                if (MCU_memory[0x1AAF] < 0x05)
                {
                _608F:
                    *(UINT16*)(MCU_memory + *(UINT16*)(MCU_memory + 0x1B3E)) = *(UINT16*)(MCU_memory + 0x1B3C);
                    continue;
                }
                else
                {
                _60B9:
                    return 0x00;
                }
            }
            else
            {
            _60C1:
                return 0x00;
            }
        }
    }
}

// 00F050DC - 00F0528F
UINT8 _00F050DC(UINT8* _17D0, UINT16 _17D2)
{
    UINT8 _A70C[] = {
        /*DIC*/0x44,0x49,0x43,0x00,0x01,0x20,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
        /*RCT*/0x52,0x43,0x54,0x00,0x01,0x20,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
        /*STD*/0x53,0x54,0x44,0x00,0x01,0x20,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
        /*CAC*/0x43,0x41,0x43,0x00,0x01,0x20,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
        /*DAT*/0x44,0x41,0x54,0x00,0x02,0x10,0x00,0x20,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
        /*MEM*/0x4D,0x45,0x4D,0x00,0x01,0x10,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
        /*TIM*/0x54,0x49,0x4D,0x00,0x01,0x20,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
        /*GAM*/0x47,0x41,0x4D,0x00,0x02,0x10,0x00,0x20,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
        /*DWN*/0x44,0x57,0x4E,0x00,0x01,0x10,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
        /*SYS*/0x53,0x59,0x53,0x00,0x01,0x20,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
        /*DLG*/0x44,0x4C,0x47,0x00,0x01,0x10,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
        /*SND*/0x53,0x4E,0x44,0x00,0x02,0x10,0x00,0x20,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
        /*TXT*/0x54,0x58,0x54,0x00,0x01,0x10,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
        /*BMP*/0x42,0x4D,0x50,0x00,0x01,0x10,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
        /*ANI*/0x41,0x4E,0x49,0x00,0x01,0x10,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
        /*MOV*/0x4D,0x4F,0x56,0x00,0x01,0x10,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
        /*RNG*/0x52,0x4E,0x47,0x00,0x01,0x10,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
        /*APP*/0x41,0x50,0x50,0x00,0x01,0x10,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
        /*BAK*/0x42,0x41,0x4B,0x00,0x01,0x20,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 };
    for (UINT8 _17CD = 0x00; _17CD < 0x13; _17CD++)
    {
    _610F:
        if (SysMemcmp(_A70C + _17CD * 0x0019, _17D0, 0x0003) == 0x00)
        {
        _618C:
            for (UINT8 _17CC = 0x00; _17CC < _A70C[_17CD * 0x0019 + 0x04]; _17CC++)
            {
            _61E3:
                if (_17D2 == *(UINT16*)(_A70C + _17CD * 0x0019 + 0x0005 + (_17CC << 1)))
                {
                _6268:
                    return 0x00;
                }
            }
        _6270:
            return 0x01;
        }
    }
_6278:
    return 0x02;
}

// 00F05290 - 00F052A6
void _00F05290()
{
    _00F2702E();
    _00EDBD1F();
}

// 00F052A7 - 00F0540D
UINT8 _00F052A7(UINT8 _17CF)
{
    /*
                                                          ███████████              █            ███████████
                                                          █                  ██            ██          █                  ██    ██████████████          █      █████          █      ███████          ██  ████████
                                                          █  ███████  ██    █████  █        █  ███████  ██              █    █                    █      █      █          ██              █              ██      █      █
                                                          █  █          █  ██    █            █      █  █          █  ██              █    █                ████    █      █            █        ███                  █      █      █
                                                          █  █          █  ██    █████  █        █  █          █  ██          ████████              ██      █      █                  ████████                    █      █
  █        █        █      █        █        █      █  ███████  ██            ██          █  ███████  ██      ██    █    █    ██          ███    █      █                  █    █      █      ███        █      █
███    ███    ███  ███    ███    ███    █                  ██            █            █                  ██      █    ██    █      █        █  ███  █      █        ███    ████████          █  ██████  █          █        █        █      █        █        █
  █        █        █      █        █        █      ████████████        ██              ████████████      █    █  █  ██    █        █  █  █  █      █            █    █    █      █          █        █      █        ███    ███    ███  ███    ███    ███
                                                          █  █  █  █  █  ██      █  █████      █  █  █  █  █  ██      █    █  ██    █  █      █    █      █      █            █    ████████          █        █      █          █        █        █      █        █        █
                                                          █                  ██    █            █      █                  ██      █  █      █    █  █            █    ██      █    █      █    █    █      █          █  █    █      █
                                                          █  █  █  █  █  ██      █  █████      █  █  █  █  █  ██      ██      █          █            █    █        █    █      █    █    █      █          ███    █      █
                                                          █                  ██        ██              █                  ██      █              ████            █    █        █    █    ████          ███          ██      █      ████
                                                          ████████████          █              ████████████      █                ██              █  █          ███    ██      █████████      ██        █          █
                                                            ███████████                            ███████████

███████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████
    */
    UINT8 _AA59[] = { 0x00,0x00,0x00,0x07,0xFF,0x01,0x03,0xFF,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x04,0x01,0x81,0x82,0x00,0xCF,0xFF,0xC1,0x1F,0x04,0x7F,0x06,0xFF,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x05,0xFD,0x9F,0x42,0xFE,0xC0,0x48,0x01,0x11,0x06,0x02,0x03,0x11,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x05,0x05,0x90,0x22,0x82,0xC0,0x48,0x07,0x91,0x02,0x1C,0x01,0x11,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x05,0x05,0x9F,0x42,0x82,0xC1,0xFE,0x03,0x11,0x00,0x7F,0x80,0x11,0x00,0x00,0x00,0x00,0x42,0x11,0x08,0x45,0xFD,0x81,0x82,0xFE,0xC6,0x49,0x83,0x91,0x00,0x48,0x8E,0x11,0x00,0x00,0x00,0x00,0xE7,0x3B,0x9C,0xE4,0x01,0x81,0x02,0x00,0xC4,0xC8,0x85,0xD1,0x0E,0x7F,0x82,0xFD,0x04,0x21,0x10,0x84,0x42,0x11,0x08,0x47,0xFF,0x86,0x03,0xFF,0xC4,0xAC,0x85,0x51,0x02,0x48,0x82,0x11,0x0E,0x73,0xB9,0xCE,0x00,0x00,0x00,0x05,0x55,0x8B,0xE2,0xAA,0xC4,0xB2,0x89,0x11,0x02,0x7F,0x82,0x11,0x04,0x21,0x10,0x84,0x00,0x00,0x00,0x04,0x01,0x90,0x22,0x00,0xC5,0x12,0x81,0x31,0x22,0x48,0x82,0x91,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x05,0x55,0x8B,0xE2,0xAA,0xC6,0x20,0x81,0x21,0x22,0x48,0x83,0x91,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x04,0x01,0x86,0x02,0x00,0xC4,0x07,0x81,0x21,0x27,0x83,0x83,0x11,0xE0,0x00,0x00,0x00,0x00,0x00,0x00,0x07,0xFF,0x82,0x03,0xFF,0xC4,0x03,0x01,0x41,0xCC,0x7F,0xC6,0x10,0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x03,0xFF,0x80,0x01,0xFF,0xC0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFE };
    U8 _AB99[] = { 0x00,0x50 };
    UINT8 _AA17[] = { 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 };
    /*
        ████
      █      █
  ██      █
█        █
        ██████████
                            █
                            █
            ████████
                    █
                    █
            █████
                  █
          █████
██            █
    ██    ██
        ███
    */
    UINT8 _A9F7[] = { 0x0F,0x00,0x11,0x00,0x62,0x00,0x84,0x00,0x0F,0xFC,0x00,0x02,0x00,0x02,0x03,0xFC,0x00,0x20,0x00,0x20,0x03,0xE0,0x00,0x40,0x07,0xC0,0xC0,0x80,0x33,0x00,0x0E,0x00 };
    UINT8 _A927[] = "传送电子图书";
    GuiMenuItemType _AB9B = { 0x0C, _A927, _AA17, _A9F7 };
    UINT8 _A934[] = "传送开机动画";
    GuiMenuItemType _ABA2 = { 0x0C, _A934, _AA17, _A9F7 };
    UINT8 _A941[] = "传送开机铃声";
    GuiMenuItemType _ABA9 = { 0x0C, _A941, _AA17, _A9F7 };
    UINT8 _A94E[] = "传送  词典类";
    GuiMenuItemType _ABB0 = { 0x0C, _A94E, _AA17, _A9F7 };
    UINT8 _A95B[] = "传送  背诵类";
    GuiMenuItemType _ABB7 = { 0x0C, _A95B, _AA17, _A9F7 };
    UINT8 _A968[] = "传送  学习类";
    GuiMenuItemType _ABBE = { 0x0C, _A968, _AA17, _A9F7 };
    UINT8 _A975[] = "传送  计算类";
    GuiMenuItemType _ABC5 = { 0x0C, _A975, _AA17, _A9F7 };
    UINT8 _A982[] = "传送  资料类";
    GuiMenuItemType _ABCC = { 0x0C, _A982, _AA17, _A9F7 };
    UINT8 _A98F[] = "传送  名片类";
    GuiMenuItemType _ABD3 = { 0x0C, _A98F, _AA17, _A9F7 };
    UINT8 _A99C[] = "传送  时间类";
    GuiMenuItemType _ABDA = { 0x0C, _A99C, _AA17, _A9F7 };
    UINT8 _A9A9[] = "传送  下载类";
    GuiMenuItemType _ABE1 = { 0x0C, _A9A9, _AA17, _A9F7 };
    UINT8 _A9B6[] = "传送  游戏类";
    GuiMenuItemType _ABE8 = { 0x0C, _A9B6, _AA17, _A9F7 };
    UINT8 _A9C3[] = "传送  系统类";
    GuiMenuItemType _ABEF = { 0x0C, _A9C3, _AA17, _A9F7 };
    UINT8 _A9D0[] = "传送  听力类";
    GuiMenuItemType _ABF6 = { 0x0C, _A9D0, _AA17, _A9F7 };
    UINT8 _A9DD[] = "传送  声音类";
    GuiMenuItemType _ABFD = { 0x0C, _A9DD, _AA17, _A9F7 };
    UINT8 _A9EA[] = "传送静态图片";
    GuiMenuItemType _AC04 = { 0x0C, _A9EA, _AA17, _A9F7 };
    PtrGuiMenuItemType _AC0B[] = { &_AB9B,&_ABA2,&_ABA9,&_ABB0,&_ABB7,&_ABBE,&_ABC5,&_ABCC,&_ABD3,&_ABDA,&_ABE1,&_ABE8,&_ABEF,&_ABF6,&_ABFD,&_AC04 };
    GuiMenuType _AC2B = {
        0x10,
        0x01,
        _AB99,
        0x03,
        _AC0B,
    };
    GuiMenuEnvType _17C5;
    _17C5.x0 = 0x10;
    _17C5.y0 = 0x10;
    _17C5.x1 = 0x9F;
    _17C5.y1 = 0x5F;
    SysLcdPartClear(0x00, 0x00, 0x9E, 0x5F);
    SysPicture(0x00, 0x00, 0x9E, 0x0F, _AA59, 0x00);
    UINT8 _17C4 = GuiMenu(_17CF, &_AC2B, &_17C5);
    return _17C4;
}

// 00F0540E - 00F0566C
void _00F0540E(UINT8 _17CF, UINT8 _17D0, UINT8 _17D1, UINT8 _17D2, UINT32 _17D3, UINT32 _17D7, UINT32 _17DB)
{
    MCU_memory[0x1B59] = _17CF;
    MCU_memory[0x1B5A] = _17D0;
    MCU_memory[0x1B5B] = _17D1;
    MCU_memory[0x1B5C] = _17D2;
    *(UINT32*)(MCU_memory + 0x1B5D) = _17D3;
    *(UINT32*)(MCU_memory + 0x1B61) = _17D7;
    *(UINT32*)(MCU_memory + 0x1B65) = _17DB;
    SysLcdPartClear(_17CF, _17D0, _17CF + _17D1, _17D0 + _17D2);
    SysRect(_17CF, _17D0, _17CF + _17D1, _17D0 + _17D2);
    _17D1 -= 0x02;
    UINT8 _17CA = _17DB * _17D1 / (_17D3 - _17D7);
    SysFillRect(_17CF + 0x01, _17D0 + 0x02, _17CF + _17CA, _17D0 + _17D2 - 0x02);
    MCU_memory[0x1B69] = _17CA;
}

// 00F0566D - 00F05879
void _00F0566D(UINT32 _17D0)
{
    if (_17D0 > *(UINT32*)(MCU_memory + 0x1B5D))
    {
    _66A7:
        _17D0 = *(UINT32*)(MCU_memory + 0x1B5D);
    }
_66C7:
    UINT8 _17C7 = _17D0 * MCU_memory[0x1B5B] / (*(UINT32*)(MCU_memory + 0x1B5D) - *(UINT32*)(MCU_memory + 0x1B61));
    if (_17C7 > MCU_memory[0x1B69])
    {
    _676C:
        SysFillRect(MCU_memory[0x1B59] + MCU_memory[0x1B69], MCU_memory[0x1B5A] + 0x02, MCU_memory[0x1B59] + _17C7, MCU_memory[0x1B5C] + MCU_memory[0x1B5A] - 0x02);
    }
_67D7:
    if (_17C7 <= MCU_memory[0x1B69])
    {
    _67EA:
        if (_17C7 + 0x01 > 0x01)
        {
        _67FE:
            SysLcdPartClear(MCU_memory[0x1B59] + _17C7, MCU_memory[0x1B5A] + 0x02, MCU_memory[0x1B59] + MCU_memory[0x1B69], MCU_memory[0x1B5C] + MCU_memory[0x1B5A] - 0x02);
        }
    }
}

// 00F05B32 - 00F05C6A
UINT16 _00F05B32(UINT8* _17D0, UINT8* _17D2)
{
    U16 _17CD;
    *(UINT16*)(_17D2 + 0x0002) = 0x0001;
    *(UINT16*)_17D2 = 0x0001;
    UINT8 _17CF = *_17D0;
    FileNum(_17CF, &_17CD);
    *(UINT16*)(_17D2 + 0x0004) = _17CD;
    _00FC891F(_17D0, _17D2);
    return _17CD;
}

// 00F05C6B - 00F05DAD
void _00F05C6B(UINT8 _17CF)
{
    UINT8 _AA37[] = { 0x10,0x10,0x00,0x00 };
    UINT8 _A917[0x10] = { 0x3F,0x3A,0x11,0x3B,0x35,0x39,0x36,0x3E,0x37,0x38,0x33,0x3D,0x34,0x2D,0x2C,0x2B };
    FlashInit();
    UINT8 _17CC = _A917[_17CF];
    MCU_memory[0x1B99] = _17CC;
    MCU_memory[0x1B9A] = 0x06;
    MCU_memory[0x1B9B] = 0x20;
    *(UINT16*)(MCU_memory + 0x1B9C) = _AA37;
    *(UINT16*)(MCU_memory + 0x1B9E) = 0x0000;
    MCU_memory[0x1BA0] = 0x00;
    MCU_memory[0x1BA1] = 0x01;
    _00F05B32(MCU_memory + 0x1B99, MCU_memory + 0x1B6A);
}

// 00F05DAE - 00F061EC
UINT16 _00F05DAE(UINT8 _17CF)
{
    UINT8 _A917[0x10] = { 0x3F,0x3A,0x11,0x3B,0x35,0x39,0x36,0x3E,0x37,0x38,0x33,0x3D,0x34,0x2D,0x2C,0x2B };
    U8 _AC6E[] = "没有这类文件!";
    U8 _AC7E[] = "释放错误1.";
    U8 _AC89[] = "释放错误2.";
    U8 _AC94[] = "释放错误3.";
    U8* _AC7C = _AC6E;
    UINT8 _17CA;
    U16 _17C6;
    UINT8 _17C3 = _A917[_17CF];
    FileNum(_17C3, &_17C6);
    if (_17C6 == 0x0000)
    {
    _6E2A:
        SysLcdPartClear(0x00, 0x10, 0x9E, 0x5F);
        GuiMsgBox(_AC7C, 0x00C8);
        return 0xFFFF;
    }
_6E9F:
    UINT8* _17C4 = (UINT8*)SysMemAllocate(_17C6 * 0x0002);
    *(UINT16*)(MCU_memory + 0x1B94) = _17C4;
    _00EA90F3(MCU_memory[0x1B99], MCU_memory + 0x1B94, _17C6);
    UINT16 _17C8 = _00F18000(MCU_memory + 0x1B99, MCU_memory + 0x1B6A, &_17CA);
    _17C8 = *(UINT16*)(MCU_memory + (_17C8 << 1) + *(UINT16*)(MCU_memory + 0x1B94) - (0x0001 << 1));
    if (0x0027 == _17CA)
    {
    _708A:
        if (SysMemFree((char*)_17C4) == 0x00)
        {
        _70BD:
            GuiMsgBox(_AC7E, 0x00C8);
        }
    _70EE:
        return _17C8;
    }
    else if (0x0028 == _17CA)
    {
    _70FC:
        if (SysMemFree((char*)_17C4) == 0x00)
        {
        _712F:
            GuiMsgBox(_AC89, 0x00C8);
        }
    _7160:
        return 0xFFFF;
    }
    else if (0x00FF == _17CA)
    {
    _716B:
        if (SysMemFree((char*)_17C4) == 0x00)
        {
        _719E:
            GuiMsgBox(_AC94, 0x00C8);
        }
    _71CF:
        return 0xFFFE;
    }
    else
    {
    _71DA:
        return 0xFF - _17CA; // todo汇编没有这块
    }
}

// 00F061ED - 00F06304
UINT8 _00F061ED(UINT8 _17CF, UINT16 _17D0, UINT32* _17D2)
{
    UINT8 _A917[0x10] = { 0x3F,0x3A,0x11,0x3B,0x35,0x39,0x36,0x3E,0x37,0x38,0x33,0x3D,0x34,0x2D,0x2C,0x2B };
    U16 _17CA;
    U8 _17C9;
    U8 _17BF[0x0A];
    UINT8 _17CC = _A917[_17CF];
    FileSearch(_17CC, _17D0, &_17CA, _17BF);
    FileOpen(_17CA, _17CC, 0x02, &_17C9, (U32*)_17D2);
    return _17C9;
}

// 00F06305 - 00F064A4
UINT16 _00F06305(UINT8* _17D0)
{
    UINT8 _17C7;
    SysTimer1Open(0x32);
    UINT8 _17C8 = 0x01;
    UINT16 _17C9 = 0x0000;
    MsgType _17CB;
    while (0x01)
    {
    _7338:
        if (GuiGetMsg(&_17CB) != 0x01)
        {
        _736D:
            continue;
        }
    _7370:
        if (_17CB.type == 0x07)
        {
        _737C:
            if (SysReadCom(_17D0, &_17C8) >= 0x01)
            {
                _73B7:
                _17C9 = 0x0000;
            }
        _73C0:
            if (_17C8 == 0x01)
            {
            _73CC:
                SysReadCom(&_17C7, &_17C8);
                _17C9 = 0x0001;
            }
        }
        else if (_17CB.type == 0x06)
        {
        _7432:
            _17C9 = 0x0002;
        }
        else if (_17CB.type == 0x01)
        {
        _744F:
            if (_17CB.param == 0x002E)
            {
                _746A:
                _17C9 = 0x0000;
            }
            else
            {
                continue;
            }
        }
        else
        {
            continue;
        }
        break;
    }
_7479:
    SysTimer1Close();
    return _17C9;
}

// 00F064A5 - 00F06789
UINT16 _00F064A5(UINT8 _17CF, UINT8 _17D0, UINT8 _17D1)
{
    UINT16 _17CC = 0x0000;
    UINT8 _17C9;
    UINT8 _1749[0x80];
    if (_17D1 == 0x01)
    {
    _74CD:
        _1749[0x0004] = 0x04;
    }
    else
    {
    _74F8:
        _1749[0x0004] = 0x03;
    }
_7520:
    *(UINT16*)(_1749 + 0x0002) = 0x0000;
    _1749[0x0005] = _17D0;
    FileRead(_17CF, _17D0, _1749 + 0x0006);
    for (UINT8 _17CE = 0x04; _17CE < 0x0080; _17CE++)
    {
    _75F1:
        _17CC += _1749[_17CE];
    }
_764D:
    *(UINT16*)_1749 = _17CC;
    for (UINT8 _17CE = 0x00; _17CE < 0x05; _17CE++)
    {
    _7699:
        SysWriteCom(0x80, _1749);
        UINT16 _17CA = _00F06305(&_17C9);
        if (_17CA == 0x0001)
        {
        _770F:
            if (_17C9 == 0x01)
            {
            _771B:
                return 0x0001;
            }
            else if (_17C9 == 0xFF)
            {
                _7735:
                return 0x0000;
            }
        }
        else if (_17CA == 0x0000)
        {
            _775E:
            return 0x0000;
        }
    }
_776C:
    return 0x0000;
}

// 00F0678A - 00F06B25
UINT16 _00F0678A(UINT8 _17CF, UINT16 _17D0)
{
    UINT8 _A917[0x10] = { 0x3F,0x3A,0x11,0x3B,0x35,0x39,0x36,0x3E,0x37,0x38,0x33,0x3D,0x34,0x2D,0x2C,0x2B };
    UINT16 _17CC = 0x0000;
    UINT8 _17C9;
    UINT32 _17C4;
    UINT8 _17C3 = _A917[_17CF];
    UINT8 _176F[0x54];
    _176F[0x04] = 0x02;
    *(UINT16*)(_176F + 0x0002) = 0x0000;
    for (UINT8 _17CE = 0x00; _17CE < 0x0A; _17CE++)
    {
    _7843:
        _176F[0x000A + _17CE] = 0xFF;
    }
_788D:
    _176F[0x05] = _17C3;
    UINT8 _17C8 = _00F061ED(_17CF, _17D0, &_17C4);
    *(UINT32*)(_176F+0x0006) = _17C4;
    FileRead(_17C8, 0x40, _176F+0x14);
    FileClose(_17C8);
    for (UINT8 _17CE = 0x04; _17CE < 0x54; _17CE++)
    {
        _7995:
        _17CC += _176F[_17CE];
    }
_79F1:
    *(UINT16*)_176F = _17CC;
    for (UINT8 _17CE = 0x00; _17CE < 0x05; _17CE++)
    {
    _7A3D:
        SysWriteCom(0x54, _176F);
        UINT16 _17CA = _00F06305(&_17C9);
        if (_17CA == 0x0001)
        {
        _7AAB:
            if (_17C9 == 0x01)
            {
                _7AB7:
                return 0x0001;
            }
            else if (_17C9 == 0xFF)
            {
                _7AD1:
                return 0x0000;
            }
        }
        else if (_17CA == 0x0000)
        {
            _7AFA:
            return 0x0000;
        }
    }
_7B08:
    return 0x0000;
}


// 00F06EA7 - 00F07175
UINT16 _00F06EA7(UINT8 _17CF)
{
    UINT8 _A917[0x10] = { 0x3F,0x3A,0x11,0x3B,0x35,0x39,0x36,0x3E,0x37,0x38,0x33,0x3D,0x34,0x2D,0x2C,0x2B };
    UINT8 _17CA;
    UINT8 _17BF[0x09];
    UINT16 _17CB = 0x0000;
    UINT8 _17CE = _A917[_17CF];
    _17BF[0x04] = 0x01;
    *(UINT16*)(_17BF + 0x0002) = 0x0000;
    _17BF[0x05] = 0x00;
    *(UINT16*)(_17BF + 0x0006) = 0x0010;
    _17BF[0x08] = 0x01;
    for (UINT8 _17CD = 0x04; _17CD < 0x09; _17CD++)
    {
        _7FE5:
        _17CB += _17BF[_17CD];
    }
_8041:
    *(UINT16*)_17BF = _17CB;
    for (UINT8 _17CD = 0x00; _17CD < 0x14; _17CD++)
    {
    _808D:
        SysWriteCom(0x09, _17BF);
        UINT16 _17C8 = _00F06305(&_17CA);
        if (_17C8 == 0x0001)
        {
        _80FB:
            if (_17CA == 0x01)
            {
            _8107:
                return 0x0001;
            }
            else if (_17CA == 0xFF)
            {
            _8121:
                return 0x0000;
            }
        }
        else if (_17C8 == 0x0000)
        {
        _814A:
            return 0x0000;
        }
    }
_8158:
    return 0x0000;
}

// 00F07176 - 00F07758
UINT8 _00F07176(UINT8 _17CF, UINT16 _17D0)
{
    U8 _A8F3[] = "通讯串口打开错误!";
    U8 _A907[] = "文件传输成功!";
    U8 _AC9F[] = "开始传送数据...";
    U8 _ACB1[] = "通讯失败...";
    U8** _A905 = &_A8F3;
    U8** _A915 = &_A907;
    U8** _ACAF = &_AC9F;
    U8** _ACBD = &_ACB1;
    UINT32 _17CB;
    UINT32 _17C1;
    SysLcdPartClear(0x00, 0x10, 0x9E, 0x5F);
    SysCloseCom();
    if (SysOpenCom(0x00, 0x04, 0x00) != 0x01)
    {
    _81F9:
        GuiMsgBox(*_A905, 0x0064);
        return 0x00;
    }
_8231:
    SysPrintString(0x10, 0x30, *_ACAF);
    UINT16 _17BE = _00F06EA7(_17CF);
    if (_17BE == 0x0000)
    {
    _828D:
        SysCloseCom();
        GuiMsgBox(*_ACBD, 0x0064);
        return 0x00;
    }
_82D0:
    _17BE = _00F0678A(_17CF, _17D0);
    if (_17BE == 0x0000)
    {
    _831B:
        SysCloseCom();
        GuiMsgBox(*_ACBD, 0x0064);
        return 0x00;
    }
_835E:
    UINT8 _17CA = _00F061ED(_17CF, _17D0, &_17CB);
    UINT32 _17C6 = _17CB / 0x0000007A;
    UINT8 _17C5 = _17CB % 0x0000007A;
    if (_17C5 == 0x00)
    {
    _83F1:
        _17C6 -= 0x00000001;
    }
    _8421:
    SysLcdPartClear(0x00, 0x10, 0x9E, 0x5F);
    _00F0540E(0x00, 0x28, 0x9E, 0x10, _17C6, 0x00000000, 0x00000000);
    UINT8 _17C0 = 0x00;
    for (_17C1 = 0x00000000; _17C1 < _17C6; _17C1 += 0x00000001)
    {
    _851D:
        _17C0 += 0x01;
        _17BE = _00F064A5(_17CA, 0x7A, 0x00);
        if (_17BE == 0x0000)
        {
        _856D:
            FileClose(_17CA);
            SysCloseCom();
            GuiMsgBox(*_ACBD, 0x0064);
            return 0x00;
        }
    _85BF:
        if (_17C0 == 0x05)
        {
        _85CB:
            _17C0 = 0x00;
            _00F0566D(_17C1);
        }
    }
_85F7:
    _00F0566D(_17C1);
    if (_17C5 == 0x00)
    {
    _8623:
        _17BE = _00F064A5(_17CA, 0x7A, 0x01);
        if (_17BE == 0x0000)
        {
        _866A:
            FileClose(_17CA);
            SysCloseCom();
            return 0x00;
        }
    }
    else
    {
    _868C:
        _17BE = _00F064A5(_17CA, _17C5, 0x01);
        if (_17BE == 0x0000)
        {
        _86D5:
            FileClose(_17CA);
            SysCloseCom();
            return 0x00;
        }
    }
    _86F4:
    FileClose(_17CA);
    SysCloseCom();
    GuiMsgBox(*_A915, 0x0064);
    return 0x01;
}

// 00F07759 - 00F078F5
// 发送资料 APP 入口
void _00F07759()
{
    TypeSysIconEnv _17C4;
    FlashInit();
    SysIconAllSave(&_17C4);
    SysIconAllClear();
    UINT8 _17C3 = 0x00;
    UINT16 _17C1 = 0x0000;
    UINT8 _17C0 = 0x00;
    GuiSetCurHelpId(0x0040);
    while (0x01)
    {
    _87EC:
        if (_17C0 == 0x01)
        {
        _87F8:
            break;
        }
    _87FB:
        _17C3 = _00F052A7(_17C3);
        if (_17C3 == 0xFF || _17C3 == 0xFE || _17C3 == 0xFD)
        {
        _882A:
            break;
        }
    _882D:
        _00F05C6B(_17C3);
        while (0x01)
        {
        _883B:
            UINT16 _17C1 = _00F05DAE(_17C3);
            if (_17C1 == 0xFFFF)
            {
            _8868:
                continue;
            }
        _886B:
            if (_17C1 == 0xFFFE)
            {
            _8886:
                _17C0 = 0x01;
                break;
            }
        _888F:
            _00F07176(_17C3, _17C1);
        }
    }
_88BA:
    SysIconAllRestore(&_17C4);
}

// 00F163FA - 00F1661D
U8 _00F163FA(U8* helpAddr)
{
    UINT8 _17BB[5];
    TypeSysIconEnv _17AF;
    SysCursorReadParam(_17BB);
    if (_17BB[4] == 0x01)
    {
    _7441:
        CloseCursor();
    }
_744C:
    SysSaveScreenEx();
    SysIconAllSave(&_17AF);
    SysIconCaps(0x00);
    SysIconNum(0x00);
    SysIconAllClear();
    UINT16 _17C1 = GuiGetKbdState();
    GuiSetInputFilter(INPUT_ENG_ENABLE);
    GuiSetKbdType(SYS_ENG_KBD);
    UINT8 _17C3 = 0x01;
    UINT8 _17C4 = 0x00;
    _00F1661E(helpAddr, _17C4, _00F1702D(helpAddr));
    GuiSetKbdState(_17C1);
    SysIconCaps(0x00);
    SysIconAllRestore(&_17AF);
    SysRestoreScreenEx();
    if (_17BB[4] == 0x01)
    {
        _75B1:
        CursorInit(_17BB[0], _17BB[1]);
        OpenCursorInit(_17BB[2], _17BB[3]);
    }
    return 0x00;
}

// 00F1661E - 00F16C39
U8 _00F1661E(U8* helpAddr, UINT8 _17D2, UINT8 _17D3)
{
    MsgType _17CC;
    UINT8* _17C7 = helpAddr;
    UINT16 _17C5;
    UINT8 _17C2;
    UINT8 _17C1 = _00F16C3A(_17D2, _17C7, &_17C5);
    UINT8 _17C0;
    while (1)
    {
        SysIconScrollBarUpArrow(0x01);
        SysIconScrollBarDownArrow(0x01);
        if (_17D2 == 0x00)
        {
            SysIconScrollBarUpArrow(0x00);
        }
    _76BC:
        if (_17C1 >= _17D3)
        {
        _76CA:
            _17C1 = _17D3;
            SysIconScrollBarDownArrow(0x00);
        }
    _76DF:
        _00F1712A(_17C1, _17D3);
        if (GuiGetMsg(&_17CC))
        {
        _7735:
            if (GuiTranslateMsg(&_17CC))
            {
            _776D:
                if (_17CC.type == DICT_WM_COMMAND)
                {
                _77B0:
                    if (_17CC.param == CMD_RETURN_HOME)
                    {
                    _77EA:
                        MsgType _17C9 = { DICT_WM_COMMAND,CMD_RETURN_HOME };
                        GuiPushMsg(&_17C9);
                        return 0xFE;
                    }
                    else if (_17CC.param == CMD_SCR_NESTED)
                    {
                    _785D:
                        return 0xFD;
                    }
                }
                else if (_17CC.type == DICT_WM_CHAR_FUN)
                {
                _7865:
                    switch (_17CC.param)
                    {
                    case CHAR_DOWN: // 788F
                        if (_17C1 < _17D3)
                        {
                        _789D:
                            _17D2++;
                            UINT8 _17C0 = _17C7[0];
                            while (_17C0)
                            {
                            _78CB:
                                _17C0 = _17C7[0];
                                _17C7 += 0x0001;
                            }
                        _790D:
                            _17C1 = _00F16C3A(_17D2, _17C7, &_17C5);
                        }
                        break;
                    case CHAR_UP: // 794B
                        _17D2--;
                        if (_17D2 == 0xFF || _17D2 < 0x80)
                        {
                        _796C:
                            _17D2 = 0x00;
                        }
                    _7972:
                        _17C7 = helpAddr;
                        _17C0 = _17C7[0];
                        _17C2 = 0x00;
                        while (_17C2 + 0x01 != _17D2)
                        {
                        _79C2:
                            if (_17C0 == 0x00)
                            {
                            _79D1:
                                _17C2++;
                            }
                        _79DC:
                            _17C7 += 0x0001;
                            _17C0 = _17C7[0];
                        }
                    _7A1E:
                        _17C1 = _00F16C3A(_17D2, _17C7, &_17C5);
                        break;
                    case CHAR_PGDN: // 7A5C
                        _17C1++;
                        if (_17C1 <= _17D3)
                        {
                        _7A77:
                            _17D2 += 0x06;
                            _17C1 = _00F16C3A(_17D2, MCU_memory+_17C5, &_17C5);
                        }
                        break;
                    case CHAR_PGUP: // 7AD6
                        _17D2 -= 0x06;
                        if (_17D2 == 0xFF || _17D2 < 0x80)
                        {
                        _7AF7:
                            _17D2 = 0x00;
                        }
                    _7AFD:
                        _17C7 = helpAddr;
                        _17C0 = _17C7[0];
                        _17C2 = 0x00;
                        while (_17C2 + 0x01 != _17D2)
                        {
                        _7B4D:
                            if (_17C0 == 0x00)
                            {
                            _7B5C:
                                _17C2++;
                            }
                        _7B67:
                            _17C7 += 0x0001;
                            _17C0 = _17C7[0];
                        }
                        _7BA9:
                        _17C1 = _00F16C3A(_17D2, _17C7, &_17C5);
                        break;
                    case CHAR_EXIT: // 7BE7
                        return 0xFF;
                        break;
                    case CHAR_ENTER: // 7BEC
                        return 0x27;
                        break;
                    }
                }
                else if (_17CC.type == DICT_WM_POWER)
                {
                _7BF4:
                    if (_17CC.param == PWR_OFF)
                    {
                    _7C1C:
                        return 0xFF;
                    }
                }
            }
        }
    }
}

// 00F16C3A - 00F1702C
UINT8 _00F16C3A(UINT8 _17CF, UINT8* _17D0, UINT16* _17D2)
{
    UINT8* _17C4 = _17D0;
    UINT8 _17C8 = 0x00;
    UINT8 _17C7 = 0x00;
    UINT16 _17C2 = 0x0000;
    UINT8 _17AB[0x15];
    UINT8 _17AA;
    UINT8 _17A9 = _17C4[0];
    while (_17C2 < 0x0006)
    {
    _7CA7:
        UINT8 _17C6 = _17C2 * 0x0010;
        if (_17A9 == 0x01)
        {
        _7CD2:
            SysLcdPartClear(_17C8, _17C7 + _17C6, _17C8 + 0x009E, _17C7 + _17C6 + 0x0F);
        }
        else
        {
        _7D51:
            for (UINT16 _17C9 = 0x0000; _17C9 < 0x0015; _17C9++)
            {
            _7D9E:
                _17AB[_17C9] = 0x00;
            }
        _7DD0:
            UINT16 _17C0 = 0x0000;
            while (_17A9)
            {
            _7DE8:
                _17AB[_17C0] = _17A9;
                _17C4 += 0x0001;
                _17A9 = _17C4[0];
                _17C0++;
            }
        _7E7E:
            SysLcdPartClear(_17C8, _17C7 + _17C6, _17C8 + 0x009E, _17C7 + _17C6 + 0x0F);
            SysPrintString(_17C8, _17C7 + _17C6, _17AB);
            _17C4 += 0x0001;
            _17A9 = _17C4[0];
            _17AA = _17CF + _17C2 + 0x0001;
        }
        _7FAE:
        _17C2++;
    }
_7FD4:
    *_17D2 = *(UINT16*)_17C4;
    return _17AA;
}

// 00F1702D - 00F17129
U8 _00F1702D(U8* helpAddr)
{
    UINT8* _17CE = helpAddr;
    UINT8 _17CC = _17CE[0];
    UINT8 _17CD = 0x00;
_8073:
    for(;;)
    {
        if (_17CC == 0x00)
        {
        _8082:
            _17CD++;
        }
    _808D:
        _17CE += 0x0001;
        _17CC = _17CE[0];
        if ((_17CC == 0x01) && (*(_17CE - 0x0001) == 0x00))
        {
            break;
        }
    }
_8110:
    return _17CD;
}

// 00F1712A - 00F171EE
void _00F1712A(UINT8 _17CF, UINT8 _17D0)
{
    UINT32 _17C7 = _17CF;
    _17C7 *= 0x00000064;
    UINT32 _17CB = _17D0;
    UINT8 _17C6 = _17C7 / _17CB;
    SysIconSetLeftScrollBar(_17C6);
}

// 00F18000 - 00F189F4
UINT16 _00F18000(UINT8* _17D0, UINT8* _17D2, UINT8* _17D4)
{
    TypeSysIconEnv _17BD;
    UINT16 _17C9 = 0x0001;
    UINT8* _17CB = (UINT8*)SysMemAllocate((_17D0[0x02] + 0x02) * 0x05);
    SysIconAllSave(&_17BD);
    SysIconAllClear();
    SysIconCaps(0x00);
    GuiSetInputFilter(0x02);
    GuiSetKbdType(0x02);
    if (*(UINT16*)(_17D2 + 0x04) == 0x0005) // todo 汇编判断条件未理解
    {
    _50F2:
        *(UINT16*)(_17D2 + 0x2D) = 0x0000;
        UINT16 _17CE = *(UINT16*)(_17D2 + 0x04);
        _17D2[0x0A] = _17CE;
    }
    else
    {
        _517B:
        *(UINT16*)(_17D2 + 0x2D) = 0x0001;
    }
    for (;;)
    {
    _51B4:
        UINT8 _17CD = _00F189F5(_17D0, _17D2, _17CB);
        switch (_17CD)
        {
        case 0x0001: // _5218
            break;
        case 0x0002: // _521B
            if (_17D2[0x0A] != 0x05)
            {
            _5232:
                _17D2[0x0A] += 0x01;
            }
            break;
        case 0x0003: // _5273
            *(UINT16*)(_17D2 + 0x02) += 0x0005;
            if (*(UINT16*)(_17D2 + 0x02) + 0x0005 != *(UINT16*)(_17D2 + 0x04)) // todo 汇编判断条件未理解
            {
            _5345:
                _17D2[0x0A] = *(UINT16*)(_17D2 + 0x04) - *(UINT16*)(_17D2 + 0x02) + 0x0001;
                if (_17D2[0x06] >= _17D2[0x0A])
                {
                _5417:
                    _17D2[0x06] = _17D2[0x0A];
                    *(UINT16*)_17D2 = *(UINT16*)(_17D2 + 0x02) + _17D2[0x06] - 0x0001;
                }
            }
        _54E2:
            _17D2[0x07] = _17D2[0x06] - 0x01;
            break;
        case 0x0004: // _5523
            if (_17D2[0x0A] != 0x0005)
            {
            _553A:
                _17D2[0x0A] = 0x05;
            }
            _5560:
            if (*(UINT16*)_17D2 + 0x0001 != 0x0002)
            {
            _5594:
                *(UINT16*)(_17D2 + 0x02) -= 0x0005;
            }
            else
            {
            _55FC:
                *(UINT16*)(_17D2 + 0x02) = 0x0001;
                *(UINT16*)_17D2 = *(UINT16*)(_17D2 + 0x02) + _17D2[0x06] - 0x0001;
            }
            _56BF:
            _17D2[0x07] = _17D2[0x06] - 0x01;
            break;
        case 0x00FF: // _5700
            _17D4[0] = 0xFF;
            _17C9 = 0x0000;
            SysIconAllRestore(&_17BD);
            break;
        case 0x0027: // _5750
            _17D4[0] = 0x27;
            _17C9 = 0x0000;
            SysIconAllRestore(&_17BD);
            break;
        case 0x0031: // _57A0
            _17D4[0] = 0x31;
            _17C9 = 0x0000;
            SysIconAllRestore(&_17BD);
            break;
        case 0x0032: // _57F0
            _17D4[0] = 0x32;
            _17C9 = 0x0000;
            SysIconAllRestore(&_17BD);
            break;
        case 0x0033: // _5840
            _17D4[0] = 0x33;
            _17C9 = 0x0000;
            SysIconAllRestore(&_17BD);
            break;
        case 0x0030: // _5890
            _17D4[0] = 0x30;
            _17C9 = 0x0000;
            SysIconAllRestore(&_17BD);
            break;
        case 0x0028: // _58E0
            _17D4[0] = 0x28;
            _17C9 = 0x0000;
            SysIconAllRestore(&_17BD);
            break;
        }
    _5930:
        if (_17C9 == 0x0000)
        {
        _594B:
            break;
        }
    }
_5951:
    SysMemFree((char*)_17CB);
    if (*(UINT16*)(_17D2 + 0x04) == 0x0005) // todo 汇编判断条件未理解
    {
    _59AA:
        return _17D2[0x07] + 0x01;
    }
    else
    {
    _59C8:
        return *(UINT16*)_17D2;
    }
}

// 00F189F5 - 00F19031
UINT8 _00F189F5(UINT8* _17D0, UINT8* _17D2, UINT8* _17D4)
{
    UINT8 _17B7[0x10];
    U8 _17C5;
    U8 _1789[0x0A];
    U16 _1787;
    U32 _1783;
    UINT8 _1797[0x10];
    U8 _1794;
    UINT8 _1793 = 0x02;
    UINT8* _1795 = _17D4;
    for (UINT16 _17C9 = *(UINT16*)(_17D2 + 0x02); _17C9 < *(UINT16*)(_17D2 + 0x02) + 0x0005; _17C9++)
    {
    _5AAB:
        if (_17C9 <= *(UINT16*)(_17D2 + 0x04))
        {
        _5ADF:
            if (_17D0[0x08] == 0x01)
            {
            _5AF6:
                _17C5 = *(UINT16*)(MCU_memory + *(UINT16*)(_17D2 + 0x2A) + (_17C9 << 1) - (0x0001 << 1));
            }
            else
            {
            _5B64:
                _17C5 = _17C9;
            }
            _5B7A:
            FileSearch(_17D0[0x00], _17C5, &_1787, _1789);
            FileOpen(_1787, _17D0[0x00], _1793, &_1794, &_1783);
            _00F1BD1B(&_1797, _17D0, _1794);
            FileClose(_1794);
            UINT16 _17C7;
            for (_17C7 = 0x0000; _17C7 < _17D0[0x02]; _17C7++)
            {
            _5D27:
                UINT8 _17C3 = _1797[_17C7];
                if (_1797[_17C7] + 0x01 == 0x01)
                {
                _5D6E:
                    _17C3 = 0x00;
                    *_1795 = _17C3;
                    _1795 += 0x0001;
                    break;
                }
                else
                {
                _5DBD:
                    *_1795 = _17C3;
                    _1795 += 0x0001;
                }
            }
        _5E06:
            if (_17C7 == _17D0[0x02])
            {
            _5E2E:
                *_1795 = 0x00;
                _1795 += 0x0001;
            }
        _5E72:
            if (_17C9 == *(UINT16*)(_17D2 + 0x02) + 0x0004)
            {
                _5EB1:
                *_1795 = 0x01;
            }
        }
        else
        {
        _5ECD:
            _1795[0x00] = 0x01;
        }
    }
_5EE9:
    _00F1B67E(_17B7, _17D4);
    _00F1B181(_17D2, _17D0, _17B7, 0x01, 0x0A);
    _00FC8000(_17D2);
    UINT8 _17C4 = _00F19032(_17D2, _17D0, _17B7, 0x01);
    return _17C4;
}

// 00F19032 - 00F1AE6A
UINT8 _00F19032(UINT8* _17D0, UINT8* _17D2, UINT8* _17D4, UINT8 _17D6)
{
    MsgType _17BE;
    UINT8 _17CC = 0x00;
    UINT16 _17C5 = *(UINT16*)(_17D0 + 0x2D);
    for (;;)
    {
    _6070:
        if (_17C5 == 0x0000)
        {
        _608B:
            _00FC81EF(_17D0);
        }
    _60B4:
        if (GuiGetMsg(&_17BE) == 0x00)
        {
        _60E9:
            continue;
        }
    _60EC:
        if (GuiTranslateMsg(&_17BE) == 0x00)
        {
        _6121:
            continue;
        }
    _6124:
        if (_17BE.type != 0x000A)
        {
            _6140:
            if (_17BE.type != 0x0002)
            {
                _6152:
                if (_17BE.type != 0x0005)
                {
                    continue;
                }
                else
                {
                _63AC:
                    switch (_17BE.param)
                    {
                    case 0x0023: // _63D6
                        if (_17D0[0x0A] != _17D0[0x07] + 0x01)
                        {
                        _6409:
                            if (_17D0[0x06] == 0x05)
                            {
                            _6420:
                                _17D0[0x08] = 0x00;
                                if (_17D6 == 0x01)
                                {
                                _6452:
                                    _17CC = _17D0[0x29];
                                }
                                else
                                {
                                _6468:
                                    _17CC += 0x01;
                                }
                            _6473:
                                _17D0[0x09] += 0x01;
                                _00F1B181(_17D0, _17D2, _17D4, _17D6, _17CC);
                            }
                            else
                            {
                            _64FF:
                                _00F1AE6B(_17D0, _17D4, 0x01);
                            }
                        _6533:
                            _17D0[0x07] += 0x01;
                            if (_17C5 == 0x0001)
                            {
                            _658C:
                                *(UINT16*)_17D0 += 0x0001;
                                _00FC8000(_17D0);
                            }
                        }
                        else
                        {
                        _6610:
                            _17D0[0x08] = 0x00;
                            if (_17C5 == 0x0001)
                            {
                                _6651:
                                if (*(UINT16*)_17D0 != *(UINT16*)(_17D0 + 0x0004))
                                {
                                _66A5:
                                    *(UINT16*)_17D0 += 0x0001;
                                    *(UINT16*)(_17D0 + 0x0002) += 0x0001;
                                }
                                else
                                {
                                _6765:
                                    *(UINT16*)_17D0 = 0x0001;
                                    *(UINT16*)(_17D0 + 0x0002) = 0x0001;
                                    _17D0[0x0A] = 0x05;
                                    _17D0 + 0x29;
                                    _00FC883C(_17D0);
                                }
                            _682B:
                                return 0x01;
                            }
                            else
                            {
                            _6833:
                                _00FC883C(_17D0);
                                if (_17D6 == 0x01)
                                {
                                _6868:
                                    _17CC = _17D0[0x29];
                                }
                                else
                                {
                                _687E:
                                    _17CC = 0x00;
                                }
                            _6884:
                                _00F1B181(_17D0, _17D2, _17D4, _17D6, _17CC);
                            }
                        }
                        _68CF:
                        break;
                    case 0x0022: // _68D2
                        if (_17D0[0x07] != _17D0[0x2C])
                        {
                        _6902:
                            if (_17D0[0x06] == 0x01)
                            {
                            _6919:
                                if (_17D0[0x08])
                                {
                                _692D:
                                    _17D0[0x08] = 0x00;
                                }
                            _6953:
                                _17D0[0x09] -= 0x01;
                                if (_17D6 == 0x01)
                                {
                                _699D:
                                    _17CC = _17D0[0x29];
                                }
                                else
                                {
                                _69B3:
                                    _17CC -= 0x01;
                                }
                            _69BE:
                                _00F1B181(_17D0, _17D2, _17D4, _17D6, _17CC);
                            }
                            else
                            {
                            _6A0C:
                                _00F1AE6B(_17D0, _17D4, 0x00);
                            }
                        _6A40:
                            _17D0[0x07] -= 0x01;
                            if (_17C5 == 0x0001)
                            {
                            _6A99:
                                *(UINT16*)_17D0 -= 0x0001;
                                _00FC8000(_17D0);
                            }
                        }
                        else
                        {
                        _6B1D:
                            _17D0[0x08] = 0x00;
                            if (_17C5 == 0x0001)
                            {
                                _6B5E:
                                if (*(UINT16*)_17D0 != 0x0001) // todo 汇编判断条件未理解
                                {
                                _6B91:
                                    *(UINT16*)_17D0 -= 0x0001;
                                    *(UINT16*)(_17D0 + 0x02) -= 0x0001;
                                }
                                else
                                {
                                _6C51:
                                    *(UINT16*)_17D0 = *(UINT16*)(_17D0 + 0x04);
                                    *(UINT16*)(_17D0 + 0x02) = *(UINT16*)(_17D0 + 0x04) - 0x0004;
                                    _17D0[0x06] = 0x05;
                                    _17D0[0x07] = 0x04;
                                    _17D0[0x0A] = 0x05;
                                }
                            _6D73:
                                return 0x02;
                            }
                            else
                            {
                            _6D7B:
                                UINT8 _17CD = _17D0[0x0A] - _17D0[0x2C];
                                if (_17CD >= 0x05)
                                {
                                _6DB6:
                                    _17D0[0x06] = 0x05;
                                    _17D0[0x07] = _17D0[0x0A] - 0x01;
                                    _17D0[0x09] = _17D0[0x0A] - 0x05;
                                    if (_17D6 == 0x01)
                                    {
                                    _6E64:
                                        _17CC = _17D0[0x29];
                                    }
                                    else
                                    {
                                        _6E7A:
                                        _17CC = _17D0[0x29] - 0x05;
                                    }
                                }
                                else
                                {
                                _6E93:
                                    _17D0[0x07] = _17D0[0x0A] - 0x01;
                                    _17D0[0x06] = _17CD;
                                    _17D0[0x09] = _17D0[0x2C];
                                }
                            _6F34:
                                _00F1B181(_17D0, _17D2, _17D4, _17D6, _17CC);
                            }
                        }
                        break;
                    case 0x0025: // _6F82
                        _00F1B97D(_17D0, *(UINT16*)(_17D4 + (_17D0[0x07] << 1)));
                        UINT8 _17CA = _17D0[0x08] + 0x12;
                        UINT8 _17C9 = _17D0[0x001F + _17D0[0x06] - 0x01];
                        if (_17CA < _17C9)
                        {
                        _705A:
                            if (_17D0[0x0B] >= 0x80)
                            {
                            _707E:
                                _17D0[0x08] += 0x02;
                            }
                            else
                            {
                            _70BF:
                                _17D0[0x08] += 0x01;
                            }
                        _70FD:
                            _00F1B97D(_17D0, *(UINT16*)(_17D4 + (_17D0[0x07] << 1)));
                            _17CA = _17D0[0x06] * 0x10;
                            SysLcdPartClear(0x8E, _17CA, 0x9E, _17CA + 0x0F);
                            SysPrintString(0x10, _17CA, _17D0 + 0x000B);
                            _00F1BC84(_17D0[0x001F + _17D0[0x06] - 0x01], _17D0[0x06]);
                        }
                        _7278:
                        if (_17C5 == 0x0001)
                        {
                        _7293:
                            _00FC8000(_17D0);
                        }
                        break;
                    case 0x0024: // _72BF
                        if (_17D0[0x08])
                        {
                        _72D3:
                            UINT8 _17CB = _00FC8A14(*(UINT16*)(_17D4 + (_17D0[0x07] << 1)), _17D0[0x08]);
                            _17D0[0x08] -= 0x01;
                            if (_17CB != 0x01)
                            {
                            _73A6:
                                _17D0[0x08] -= 0x01;
                            }
                        _73E4:
                            _00F1B97D(_17D0, *(UINT16*)(_17D4 + (_17D0[0x07] << 1)));
                            _17CA = _17D0[0x06] * 0x10;
                            SysLcdPartClear(0x8E, _17CA, 0x9E, _17CA + 0x0F);
                            SysPrintString(0x10, _17CA, _17D0 + 0x000B);
                            _00F1BC84(_17D0[0x001F + _17D0[0x06] - 0x01], _17D0[0x06]);
                        }
                    _755F:
                        if (_17C5 == 0x0001)
                        {
                        _757A:
                            _00FC8000(_17D0);
                        }
                        break;
                    case 0x0021: // _75A6
                        if (_17C5 == 0x0001)
                        {
                        _75C1:
                            if (*(UINT16*)(_17D0 + 0x02) + 0x0005 == *(UINT16*)(_17D0 + 0x04)) // todo 汇编判断条件未理解
                            {
                            _762B:
                                _17D0[0x08] = 0x00;
                                *(UINT16*)_17D0 += 0x0005;
                                return 0x03;
                            }
                        }
                        else
                        {
                        _76B1:
                            if (_17D0[0x09] + 0x05 < _17D0[0x0A])
                            {
                            _76E4:
                                _17D0[0x09] += 0x05;
                                if (_17D0[0x09] + 0x05 > _17D0[0x0A])
                                {
                                _775A:
                                    _17CA = _17D0[0x0A] - _17D0[0x09];
                                    if (_17CA < _17D0[0x06])
                                    {
                                    _77A6:
                                        _17D0[0x06] = _17CA;
                                    }
                                }
                            _77CE:
                                _17D0[0x07] = _17D0[0x09] + _17D0[0x06] - 0x01;
                                if (_17D6 == 0x01)
                                {
                                _7830:
                                    _17CC = _17D0[0x29];
                                }
                                else
                                {
                                _7846:
                                    _17CC += 0x05;
                                }
                            _7851:
                                _17D0[0x08] = 0x00;
                                _00F1B181(_17D0, _17D2, _17D4, _17D6, _17CC);
                            }
                        }
                        break;
                    case 0x0020: // _78C5
                        if (_17C5 == 0x0001)
                        {
                            _78E0:
                            if (*(UINT16*)(_17D0 + 0x02) != 0x0001)
                            {
                            _7907:
                                _17D0[0x08] = 0x00;
                                if (*(UINT16*)(_17D0 + 0x02) - 0x0005 >= 0x0001) // todo 汇编判断条件未理解
                                {
                                _7968:
                                    *(UINT16*)_17D0 -= 0x0005;
                                }
                                else
                                {
                                    _79C3:
                                    *(UINT16*)_17D0 = 0x0001;
                                }
                                _79E9:
                                _17D0[0x08] = 0x00;
                                return 0x04;
                            }
                        }
                        else
                        {
                        _7A17:
                            if (_17D0[0x09] != _17D0[0x2C])
                            {
                            _7A47:
                                _17D0[0x09] -= 0x05;
                                if (_17D0[0x09] < 0x80) // todo 汇编判断条件未理解
                                {
                                _7AA0:
                                    _17D0[0x07] = _17D0[0x2C] + _17D0[0x06] - 0x01;
                                    _17D0[0x09] = _17D0[0x2C];
                                }
                                else
                                {
                                _7B34:
                                    _17D0[0x07] = _17D0[0x09] + _17D0[0x06] - 0x01;
                                    if (_17D6 == 0x01)
                                    {
                                    _7B96:
                                        _17CC = _17D0[0x29];
                                    }
                                    else
                                    {
                                    _7BAC:
                                        _17CC -= 0x05;
                                    }
                                }
                            _7BB7:
                                _17D0[0x08] = 0x00;
                                _00F1B181(_17D0, _17D2, _17D4, _17D6, _17CC);
                            }
                        }
                        break;
                    case 0x0026: // _7C2B
                        UINT16 _17C1 = GuiGetCurHelpId();
                        GuiHelp(_17C1);
                        break;
                    case 0x0027: // _7C6D
                        SysIconCaps(0x00);
                        _17D0[0x08] = 0x00;
                        return 0x27;
                    case 0x0028: // _7CA5
                        SysIconCaps(0x00);
                        return 0x28;
                    case 0x0031: // _7CB7
                        UINT16 _17C7 = _00FC8506(0x31, _17D2);
                        if (_17C7 == 0x0001)
                        {
                        _7D08:
                            SysIconCaps(0x00);
                            return 0x31;
                        }
                        break;
                    case 0x0032: // _7D1D
                        UINT16 _17C7 = _00FC8506(0x32, _17D2);
                        if (_17C7 == 0x0001)
                        {
                        _7D6E:
                            SysIconCaps(0x00);
                            return 0x32;
                        }
                        break;
                    case 0x0033: // _7D83
                        UINT16 _17C7 = _00FC8506(0x33, _17D2);
                        if (_17C7 == 0x0001)
                        {
                        _7DD4:
                            SysIconCaps(0x00);
                            return 0x33;
                        }
                        break;
                    case 0x0030: // _7DE9
                        UINT16 _17C7 = _00FC8506(0x30, _17D2);
                        if (_17C7 == 0x0001)
                        {
                        _7E3A:
                            SysIconCaps(0x00);
                            return 0x30;
                        }
                        break;
                    }
                }
            }
        }
        else
        {
        _6167:
            if (_17BE.param == 0x0003)
            {
            _6182:
                SysIconCaps(0x00);
                return 0xFF;
            }
        }
    _6194:
        if (_17C5 == 0x0000)
        {
        _61AF:
            if (0x0030 < _17BE.param && _17BE.param < 0x003A)
            {
            _61ED:
                UINT8 _17CA = _17BE.param - 0x0031;
                if (_17CA < _17D0[0x0A])
                {
                _6228:
                    _00F1BC84(_17D0[0x001F + _17D0[0x06] - 0x01], _17D0[0x06]);
                    _17D0[0x06] += _17CA - _17D0[0x07];
                    _00F1BC84(_17D0[0x001F + _17D0[0x06] - 0x01], _17D0[0x06]);
                    _17D0[0x07] = _17CA;
                    return 0x27;
                }
            }
        }
    }
}

// 00F1AE6B - 00F1B180
void _00F1AE6B(UINT8* _17D0, UINT8* _17D2, UINT8 _17D4)
{
    if (_17D0[0x08])
    {
    _7E8F:
        _17D0[0x08] = 0x00;
        _00F1B97D(_17D0, *(UINT16*)(_17D2 + (_17D0[0x07] << 1)));
        SysPrintString(0x10, _17D0[0x06] * 0x10, _17D0 + 0x000B);
        _00F1BC84(_17D0[0x001F + _17D0[0x06] - 0x01], _17D0[0x06]);
    }
_7FED:
    _00F1BC84(_17D0[0x001F + _17D0[0x06] - 0x01], _17D0[0x06]);
    if (_17D4 == 0x01)
    {
    _8075:
        _17D0[0x06] += 0x01;
    }
    else
    {
    _80B6:
        _17D0[0x06] -= 0x01;
    }
_80F4:
    _00F1BC84(_17D0[0x001F + _17D0[0x06] - 0x01], _17D0[0x06]);
}

// 00F1B181 - 00F1B67D
void _00F1B181(UINT8* _17D0, UINT8* _17D2, UINT8* _17D4, UINT8 _17D6, UINT8 _17D7)
{
    UINT8 _17C7[4];
    UINT8 _17C6 = _17D0[0x09];
    for (UINT8 _17CB = 0x01; _17CB < 0x06; _17CB++)
    {
    _81C7:
        UINT8 _17CA = _17CB * 0x10;
        if (_17C6 + 0x01 < _17D0[0x0A] + 0x01 || _17D7 + 0x01 < _17D0[0x29] + 0x01)
        {
        _822C:
            if (_17D6 + 0x01 == 0x02)
            {
            _823B:
                SysPicture(0x00, _17CA, 0x0F, _17CA + 0x0F, MCU_memory +*(UINT16*)(_17D2 + 0x03), 0x01);
            }
            else
            {
            _82AE:
                itoa(_17D7 + 0x01, (char*)_17C7, 0x000A);
                SysPrintString(0x00, _17CA, _17C7);
                SysAscii(0x08, _17CA, 0x2E);
            }
        _8359:
            SysLcdPartClear(0x10, _17CA, 0x9E, _17CA + 0x0F);
            if (_17D6 + 0x01 == 0x02)
            {
            _83A3:
                _17D0[0x0024 + _17CB - 0x01] = _00F1B7D7(_17D0, *(UINT16*)(_17D4 + (_17C6 << 1)), _17CB - 0x01);
            }
            else
            {
            _8472:
                _17D0[0x0024 + _17CB - 0x01] = _00F1B7D7(_17D0, *(UINT16*)(_17D4 + (_17D7 << 1)), _17CB - 0x01);
            }
        _853E:
            SysPrintString(0x10, _17CA, _17D0 + 0x000B);
            _17C6 += 0x01;
            _17D7 += 0x01;
        }
        else
        {
        _8596:
            SysLcdPartClear(0x00, _17CA, 0x9E, _17CA + 0x0F);
        }
    _85D1:
        if (_17CB == _17D0[0x06])
        {
        _85EE:
            _00F1BC84(_17D0[0x001F + _17D0[0x06] - 0x01], _17D0[0x06]);
        }
    }
}

// 00F1B67E - 00F1B7D6
void _00F1B67E(UINT8* _17D0, UINT8* _17D2)
{
    *_17D0 = _17D2;
    _17D0 = _17D0 + (0x0001 << 1);
    UINT8 _17CD = 0x00;
    while (_17CD != 0x01)
    {
    _870E:
        _17CD = *_17D2;
        _17D2 += 0x0001;
        if (_17CD == 0x00)
        {
        _8755:
            *_17D0 = _17D2;
            _17D0 = _17D0 + (0x0001 << 1);
        }
    }
}

// 00F1B7D7 - 00F1B97C
UINT8 _00F1B7D7(UINT8* _17D0, UINT8* _17D2, UINT8 _17D4)
{
    for (UINT8 _17CE = 0x00; _17CE < 0x14; _17CE++)
    {
    _880A:
        _17D0[0x000B + _17CE] = 0x00;
    }
    _8852:
    UINT8 _17CE = 0x00;
    UINT8 _17CD = 0x00;
    while (*_17D2)
    {
    _8872:
        if (_17CE <= 0x11)
        {
        _8880:
            _17D0[0x000B + _17CE] = *_17D2;
        }
        else
        {
        _88DD:
            _17CD = 0x01;
        }
    _88E3:
        _17CE += 0x01;
        _17D2 += 0x0001;
    }
_891C:
    _17D0[0x001F + _17D4] = _17CE;
    return _17CD;
}

// 00F1B97D - 00F1BC83
UINT8 _00F1B97D(UINT8* _17D0, UINT8* _17D2)
{
    UINT8 _17CC = _17D0[0x06] - 0x01;
    UINT8 _17CB = _17D0[0x08];
    UINT8 _17CD = 0x00;
    for (UINT8 _17CE = 0x00; _17CE < 0x14; _17CE++)
    {
    _89DF:
        _17D0[0x000B + _17CE] = 0x00;
    }
_8A27:
    if (_17D0[0x24 + _17CC])
    {
    _8A67:
        _17D2 += _17CB;
        UINT8 _17CE = 0x00;
        while (*_17D2)
        {
            _8AAE:
            if (_17CE <= 0x11)
            {
            _8ABC:
                if (*_17D2 >= 0x80)
                {
                _8AD3:
                    if (_17CD + 0x01 == 0x12)
                    {
                        _8AE2:
                        _17D0[0x000B + _17CE] = 0x20;
                        return _17CD;
                    }
                    else
                    {
                    _8B2E:
                        _17D0[0x000B + _17CE] = *_17D2;
                    }
                    _17CE += 0x01;
                    _17D2 += 0x0001;
                    _17CD += 0x02;
                }
                else
                {
                _8BCC:
                    _17CD += 0x01;
                }
                _8BD7:
                _17D0[0x000B + _17CE] = *_17D2;
            }
        _8C31:
            _17CE += 0x01;
            _17D2 += 0x0001;
        }
    }
_8C6A:
    return _17CD;
}

// 00F1BC84 - 00F1BD1A
void _00F1BC84(UINT8 _17CF, UINT8 _17D0)
{
    UINT8 _17CE;
    UINT8 _17CD = _17D0 * 0x10;
    if (_17CF >= 0x12)
    {
    _8CB2:
        _17CE = 0x9E;
    }
    else
    {
    _8CBB:
        _17CE = _17CF << 0x03;
        _17CE += 0x10;
    }
_8CD5:
    SysLcdReverse(0x10, _17CD, _17CE, _17CD + 0x0F);
}

// 00F1BD1B - 00F1BDC5
void _00F1BD1B(UINT8* _17D0, UINT8* _17D2, UINT8 _17D4)
{
    FileSeek(_17D4, _17D2[0x01], 0x01);
    FileRead(_17D4, _17D2[0x02], _17D0);
}

// 00F25865 - 00F262BE
UINT8 _00F25865(UINT8* password, UINT8 _177E, UINT8 _177F, UINT8* _1780)
{
    UINT16 _177A;
    MsgType _1777;
    UINT8 _176D[10];
    UINT8 _175C[10];
    UINT8 bbk[10];
    UINT8 _1757 = _177F ? SYS_ENG_KBD : SYS_NUM_KBD;
    GuiSetInputFilter(INPUT_NUM_ENABLE | INPUT_ENG_ENABLE);
    GuiSetKbdType(_1757);
    fillmem(_176D, 0x000A, 0x00);
    fillmem(bbk, 0x000A, 0x00);
    bbk[0] = 'b';
    bbk[1] = 'b';
    bbk[2] = 'k';
    UINT8 _1758 = 0x00;
    UINT8 _175A = 0x4E;
    UINT8 _1759 = 0x2B;
    SysLcdPartClear(0x00, 0x00, 0x9E, 0x5F);
    SysRect(0x03, 0x14, 0x99, 0x3E);
    SysLine(0x03, 0x28, 0x99, 0x28);
    SysLine(0x9A, 0x15, 0x9A, 0x3F);
    SysLine(0x04, 0x3F, 0x9A, 0x3F);
    if (_177E)
    {
        _6AA3:
        if (_177E < 0x07)
        {
            UINT8* _96FE[6] = { 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000 };
            UINT8 _9710[6] = { 0x00,0x00,0x00,0x00,0x00,0x00 };
            _6AAF:
            _177A = _9710[_177E - 0x01] + 0x03;
            // str传入0x0000相当于从_DATA1中读数据
            SysPrintString(_177A, 0x17, (U8*)""/*_96FE[_177E - 0x01]*/);
        }
        else
        {
            UINT8 _175B;
            _6B28:
            if (_177E == 0x0007)
            {
                _175B = PSW_START;
            }
            else if (_177E == 0x0008)
            {
                _175B = PSW_GAME;
            }
            else if (_177E == 0x0009)
            {
                _175B = PSW_DATA;
            }
            else
            {
                _175B = PSW_START;
            }
            // 8C9F 8CAC 8CB9 
            char s[3][0x10] = { "开机密码验证", "游戏密码验证", "资料密码验证" };
            SysMemcpy(_175C, (U8*)s[_175B], 0x0010);
            SysPrintString(0x21, 0x17, _175C);
        }
    }
    else
    {
        _6C26:
        SysMemcpy(_175C, (U8*)"IDNum:", 0x0010);
        SysPrintString(0x05, 0x17, _175C);
        SysMemcpy(_175C, _1780, 0x0010);
        SysPrintString(0x37, 0x17, _175C);
    }
    _6CFF:
    SysMemcpy(_175C, (U8*)"输入密码:", 0x0010);
    SysPrintString(0x05, 0x2B, _175C);
    CursorInit(0x08, 0x10);
    OpenCursorInit(_175A, _1759);
    while (0x01)
    {
        _6DB4:
        if (GuiGetMsg(&_1777))
        {
            _6DF1:
            if (((_1777.type == DICT_WM_POWER) && (_1777.param == PWR_OFF))
                || ((_1777.type == DICT_WM_COMMAND) && (_1777.param == CMD_RETURN_HOME)))
            {
                _6E3F:
                if (_177F + 0x01 - 0x03)
                {
                    _6E4E:
                    GuiPushMsg(&_1777);
                }
                _6E79:
                CloseCursor();
                return 0x23;
            }
            _6E89:
            if (GuiTranslateMsg(&_1777))
            {
                _6EC1:
                if (_1777.type == DICT_WM_CHAR_FUN)
                {
                    _6EF2:
                    switch (_1777.param)
                    {
                    case CHAR_ENTER: // 6F1C
                        CloseCursor();
                        if (strcmp((char*)password, (char*)_176D) == 0x0000)
                        {
                            return 0x01; // 密码正确
                        }
                        else if (strcmp((char*)bbk, (char*)_176D) == 0x0000)
                        { // 输入的是"bbk"
                            if (_177F)
                            {
                                return _00F262BF();
                            }
                        }
                        return 0x03;
                    case CHAR_EXIT: // 6FFA
                        CloseCursor();
                        return 0x40;
                    case CHAR_LEFT: // 700A
                    case CHAR_DEL: // 700A
                        if (_1758 == 0x08)
                        {
                            _7016:
                            OpenCursor();
                        }
                        _7021:
                        if (_1758 + 0x01 > 0x01)
                        {
                            _7035:
                            _175A -= 0x08;
                            SysAscii(_175A, _1759, ' ');
                            _1758 -= 0x01;
                            _176D[_1758] = 0x00;
                            MoveCursor(_175A, _1759);
                        }
                        break;
                    }
                }
                else if (_1777.type == DICT_WM_CHAR_ASC)
                {
                    if ((_1758 < 0x08) && (_1759 == 0x2B))
                    {
                        _175A += 0x08;
                        MoveCursor(_175A, _1759);
                        _177A = _175A - 0x08;
                        SysAscii(_177A, _1759, '*');
                        _177A = _1777.param;
                        _176D[_1758] = _177A;
                        _1758 += 0x01;
                        if (_1758 == 0x08)
                        {
                            CloseCursor();
                        }
                    }
                    if (strcmp((char*)password, (char*)_176D) == 0x00)
                    {
                        return 0x01; // 密码正确
                    }
                    else if (strcmp((char*)bbk, (char*)_176D) == 0x00)
                    { // 输入的是"bbk"
                        if (_177F)
                        {
                            _00F262BF();
                        }
                    }
                    return 0x03;
                }
            }
        }
    }
}

// 00F262BF - 00F263D0
UINT8 _00F262BF()
{
    UINT8 _174C = _00F2658E();
    if ((_174C == 0x40) || (_174C == 0x23))
    {
        return 0x04;
    }
    if (_174C)
    {
        U8 _1738[0x10];
        SysMemcpy(_1738, (U8*)"清空所有密码", 0x0010);
        if (GuiQueryBox(0x00, 0x00, _1738) == 0x00)
        {
            SysLcdPartClear(0x00, 0x00, 0x9E, 0x5F);
            _00F2702E();
        }
        return 0x01;
    }
    return 0x03;
}

// 00F263D1 - 00F2658D
UINT8 _00F263D1(UINT8 _17A3) // 校验密码
{
    UINT8 _1782;
    UINT8 password[10];
    UINT8 _178D[20];
    fillmem(password, 0x000A, 0x00);
    UINT8 _17A1 = _00F2688F(password, _17A3);
    while (0x01)
    {
        if (_17A1 == 0x54)
        {
            UINT8 _17A2 = _17A3 + 0x06 + 0x01;
            _17A1 = _00F25865(password, _17A2, 0x02, &_1782);
            if ((_17A1 == 0x23) || (_17A1 == 0x40))
            {
                return _17A1;
            }
            if (_17A1 == 0x04)
            {
                return 0x00;
            }
            if (_17A1 != 0x01)
            {
                SysMemcpy(_178D, (U8*)"密码错误!", 0x0014);
                _00F2ACED(_178D, 0x02);
                return 0x00;
            }
            if (_17A1 == 0x01)
            {
                return 0x01;
            }
        }
        else
        {
            return 0x01;
        }
    }
}

// 00F2658E - 00F2688E
// 查询比较默认密码字典
UINT8 _00F2658E()
{
    RandEnvType _1730;
    UINT8 IDNum[0x0D];
    UINT8 super_password[0x0A];
    UINT8 _170B[0x0A];
    UINT8 _1716 = 0x03;
    SysSrand(&_1730, SysGetSecond(), 200);
    while (0x01)
    {
        _7613:
        if (_1716 == 0x03)
        {
            fillmem(IDNum, 0x000D, 0x00);
            fillmem(super_password, 0x000A, 0x00);
            _7695:
            for (UINT8 _1718 = 0x00; _1718 < 0x0C; _1718++)
            {
                _76B8:
                IDNum[_1718] = (SysRand(&_1730) % 10) + '0';
            }
            _7742:
            _00F272F7(IDNum, super_password);
            _1716 = 0x00;
        }
        UINT8 _1715 = _00F25865(super_password, 0x00, 0x00, IDNum);
        if ((_1715 == 0x40) || (_1715 == 0x23))
        {
            return _1715;
        }
        if (_1715 != 0x01)
        {
            SysMemcpy(_170B, (U8*)"密码错误!", 0x000A);
            _00F2ACED(_170B, 0x02);
            _1716 += 1;
        }
        else if (_1715 == 0x00)
        {
            return 0x01;
        }
        else
        {
            return 0x00;
        }
    }
}

// 00F2688F - 00F26B66
// 获取密码
UINT8 _00F2688F(UINT8* buf, UINT8 _1781)
{
    U8 information[0x0A];
    UINT8 filetype = 0x13;
    UINT8 datalength = 0x0A;
    UINT8 openmode = ReadAndWrite;
    UINT8 _1764[0x0A];
    UINT8 filehandle;
    UINT8 fileoffset = _1781 * 0x0A;
    UINT8 origin = FromTop;
    U16 filenum;
    U16 filename;
    U32 filelength;
    SysMemcpy(_1764, (U8*)"SysSetPWF", 0x000A);
    FileNum(filetype, &filenum);
    for (UINT8 fileorder = 0x01; fileorder <= filenum; fileorder++)
    {
        FileSearch(filetype, fileorder, &filename, information);
        if (strcmp((char*)information, (char*)_1764) == 0x00)
        {
            if (FileOpen(filename, filetype, openmode, &filehandle, &filelength))
            {
                FileSeek(filehandle, fileoffset, origin);
                FileRead(filehandle, datalength, buf);
            }
            FileClose(filehandle);
            return buf[0x09];
        }
    }
    return 0x46;
}

// 00F2702E - 00F272F6
void _00F2702E() // 清空密码
{
    U8 information[0x0A];
    UINT8 _171B[0x0A];
    UINT8 _1707[0x10];
    U16 filenum;
    U16 filename;
    U8 filehandle;
    UINT8 _1734 = 0x01;
    UINT8 openmode = ReadAndWrite;
    UINT8 filetype = 0x13;
    U32 filelength = 0x0000001F;
    UINT8 _172F = 0x1E;
    SysMemcpy(_171B, (U8*)"SysSetPWF", 0x000A);
    FileNum(filetype, &filenum);
    for (UINT8 fileorder = 0x01; fileorder <= filenum; fileorder++)
    {
        FileSearch(filetype, fileorder, &filename, information);
        if (strcmp((char*)information, (char*)_171B) == 0x00)
        {
            FileOpen(filename, filetype, openmode, &filehandle, &filelength);
            if (FileDel(filehandle))
            {
                SysMemcpy(_1707, (U8*)" *密码已经清空*", 0x0010);
                GuiMsgBox(_1707, 200);
            }
        }
    }
    _00F2A66E();
}

// 00F272F7 - 00F27C94
void _00F272F7(UINT8* IDNum, UINT8* super_password)
{
    UINT32 _1701 = 0x00000000;
    for (UINT16 _16F7 = 0x0000; _16F7 < 0x000C; _16F7++)
    {
        _8373:
        _1701 += IDNum[_16F7];
    }
    _1701 = _1701 % 0x000003E8;
    UINT8 _16F0 = _1701 % 0x000003E8 / 0x00000064;
    UINT8 _16EF = _1701 % 0x00000064 / 0x0000000A;
    UINT8 _16EE = _1701 % 0x0000000A;
    _8465:
    UINT32 _16FD = _1701 * _1701;
    UINT8 _16F6 = _16FD % 0x000003E8 / 0x00000064;
    UINT8 _16F5 = _16FD % 0x00000064 / 0x0000000A;
    UINT8 _16F4 = _16FD % 0x0000000A;
    _850D:
    UINT32 _16F9 = _1701 * _1701 * _1701;
    UINT8 _16F3 = _16F9 % 0x000003E8 / 0x00000064;
    UINT8 _16F2 = _16F9 % 0x00000064 / 0x0000000A;
    UINT8 _16F1 = _16F9 % 0x0000000A;
    _85CD:
    _16F3 = (_16F3 + _16F0) % 0x0A;
    _16F2 = (_16F2 + _16EF) % 0x0A;
    _16F1 = (_16F1 + _16EE) % 0x0A;
    _860F:
    UINT32 _16EA = (IDNum[0x09] - '0') * 0x64 + (IDNum[0x0A] - '0') * 0x0A + (IDNum[0x0B] - '0');
    _16EA *= _16EA;
    _8701:
    UINT8 _16E5 = _16EA / 0x000186A0;
    UINT8 _16E4 = _16EA / 0x00002710 % 0x0000000A;
    UINT8 _16E3 = _16EA / 0x000003E8 % 0x0000000A;
    UINT8 _16E2 = _16EA / 0x00000064 % 0x0000000A;
    UINT8 _16E1 = _16EA / 0x0000000A % 0x0000000A;
    UINT8 _16E0 = _16EA % 0x0000000A;
    _87E7:
    UINT32 _16E6 = (IDNum[0x06] - '0') * 0x64 + (IDNum[0x07] - '0') * 0x0A + (IDNum[0x08] - '0');
    _16E6 *= _16E6;
    _88D9:
    UINT8 _16DF = _16E6 / 0x000186A0;
    UINT8 _16DE = _16E6 / 0x00002710 % 0x0000000A;
    UINT8 _16DD = _16E6 / 0x000003E8 % 0x0000000A;
    UINT8 _16DC = _16E6 / 0x00000064 % 0x0000000A;
    UINT8 _16DB = _16E6 / 0x0000000A % 0x0000000A;
    UINT8 _16DA = _16E6 % 0x0000000A;
    _89BF:
    UINT8 _16D9 = IDNum[0x06] - '0';
    UINT8 _16D8 = IDNum[0x07] - '0';
    UINT8 _16D7 = IDNum[0x08] - '0';
    UINT8 _16D6 = IDNum[0x09] - '0';
    UINT8 _16D5 = IDNum[0x0A] - '0';
    UINT8 _16D4 = IDNum[0x0B] - '0';
    _8A43:
    UINT8 _16D3 = (_16E5 + _16DF + _16D9) % 0x0A;
    UINT8 _16D2 = (_16E4 + _16DE + _16D8) % 0x0A;
    UINT8 _16D1 = (_16E3 + _16DD + _16D7) % 0x0A;
    UINT8 _16D0 = (_16E2 + _16DC + _16D6) % 0x0A;
    UINT8 _16CF = (_16E1 + _16DB + _16D5) % 0x0A;
    UINT8 _16CE = (_16E0 + _16DA + _16D4) % 0x0A;
    _8AE5:
    super_password[0x00] = ((_16F6 + _16D3) % 0x0A) + '0';
    super_password[0x01] = ((_16F3 + _16D2) % 0x0A) + '0';
    super_password[0x02] = ((_16F5 + _16D1) % 0x0A) + '0';
    super_password[0x03] = ((_16F2 + _16D0) % 0x0A) + '0';
    super_password[0x04] = ((_16F4 + _16CF) % 0x0A) + '0';
    super_password[0x05] = ((_16F1 + _16CE) % 0x0A) + '0';
    super_password[0x06] = 0x00;
}

// 00F29927 - 
UINT8 _00F29927(UINT8 _17CF)
{
    UINT8 _17CE = _00F2998B(_17CF);
    if (_17CF == 0x05)
    {
    _6951:
        if (_17CE)
        {
        _695A:
            if (_00F2998B(_17CE + 0x05) == 0x00)
            {
            _696C:
                return 0x00;
            }
        }
    }
_6971:
    return _17CE;
}

// 00F2998B - 00F29D6D
// SysSetInf
UINT8 _00F2998B(UINT8 a)
{
    U32 filelength; // _1790
    U8 filehandle; // _179B
    U8 buf[0x0D]; // _17B0
    U8 information[10]; // _17A6
    UINT8 _17C4 = a;
    U16 filename; // _1794
    U16 filenum; // _1796
    U8 _179C[0x0A] = { 0 };
    UINT8 origin = FromTop; // _1799
    UINT8 _17BF = 0x01;
    UINT8 filetype = 0x13; // _17C0
    UINT8 openmode = ReadAndWrite; // _17BE
    UINT8 fileoffset = 0x00; // _179A
    UINT8 datalength = 0x0D; // _17BD
    SysMemcpy(_179C, (U8*)"SysSetInf", 0x000A);
    UINT8 _17C1 = FileNum(filetype, &filenum);
    _6A30:
    for (U8 fileorder = 0x01; fileorder <= filenum; fileorder++)
    {
        _6A64:
        _17C1 = FileSearch(filetype, fileorder, &filename, information);
        _17BF = strcmp((char*)information, (char*)_179C);
        if (_17BF == 0x00)
        {
            break;
        }
    }
    _6B22:
    if (_17BF == 0x00)
    {
    _6B31:
        _17C1 = FileOpen(filename, filetype, openmode, &filehandle, &filelength);
        if (_17C1)
        {
            _6BAD:
            _17C1 = FileSeek(filehandle, fileoffset, origin);
            _17C1 = FileRead(filehandle, datalength, buf);
            if (buf[_17C4] > 0x3C)
            {
                _6C47:
                if ((_17C4 == 0x0A) || (_17C4 == 0x03))
                {
                    _6C5F:
                    _17C1 = FileClose(filehandle);
                    return buf[_17C4];
                }
                else
                {
                    _6C93:
                    _17C1 = FileDel(filehandle);
                }
            }
            else
            {
                _6CA9:
                _17C1 = FileClose(filehandle);
                return buf[_17C4];
            }
        }
    }
_6CDA:
    if ((_17C4 == 0x08) || (_17C4 == 0x0B))
    {
        _6CF2:
        return 0x3C;
    }
    else if (_17C4 == 0x09)
    {
        _6D03:
        U8 fileorder = _00EB6FB5(0x00);
        if (fileorder > 0x3C)
        {
            _6D25:
            // Flash 地址0x0006000写数据0x1C
            _00EB7A55(0x00, 0x1C);
            return 0x1C;
        }
        else
        {
            _6D4F:
            return fileorder;
        }
    }
    _6D56:
    return 0x00;
}


// 00F2A66E - 00F2A939
void _00F2A66E()
{
    g_PwdChecked = 0x00;
    UINT8 _17CD = _00F2998B(0x02);
    SysSetKeySound(_17CD == 0);
    _17CD = _00F2998B(0x01);
    _00E9F886(_17CD == 0x00);
    float _17C9 = _00F2998B(0x08);
    float _17C5 = _17C9;
    _17C9 = _17C9 / 60.0 * 13.0;
    _17CD = (UINT8)_17C9;
    if (_17C5 + 1.0 != 1.0)
    {
        _17CD = 0x01;
    }
    SysSetVolume(_17CD);
    _17C9 = _00F2998B(0x0B);
    _17C5 = _17C9;
    _17C9 = _17C9 / 60.0 * 6.0;
    _17CD = (UINT8)_17C9;
    if (_17CD == 0x00)
    {
        _17CD = 0x01;
    }
    _00E9EFDF(_17CD);
    _17CD = _00F2998B(0x04);
    switch (_17CD)
    {
    case 0x0000:
        _17CD = 3;
        break;
    case 0x0001:
        _17CD = 5;
        break;
    case 0x0002:
        _17CD = 10;
        break;
    case 0x0003:
        _17CD = 30;
        break;
    default:
        break;
    }
    SetAutoPowerOffTimeOut(_17CD);
    _17CD = _00F2998B(0x09);
    if (_17CD / 2.0 + 0x14 > 0x3E)
    {
        SysLCDVoltage(0x3F);
    }
    else
    {
        SysLCDVoltage(_17CD / 2.0 + 0x14);
    }
}

// 00F2A93A - 00F2ACEC
UINT8 _00F2A93A(UINT8 _17CD)
{
    U8 _17B7[20];
    U8 _17B2[5];
    U16 _17B0;
    TypeSysIconEnv _17A4;
    UINT8 _17CC = g_PwdChecked >> _17CD;
    if (_17CC % 0x02)
    {
        return 0x01;
    }
    GuiEnterPswCheck();
    SysCursorReadParam(_17B2);
    CloseCursor();
    _17B0 = GuiGetKbdState();
    SysIconAllSave(&_17A4);
    SysIconAllClear();
    SysIconCaps(0x00);
    SysIconNum(0x00);
    for (UINT8 _17CB = 0x00; _17CB < 0x03; _17CB++)
    {
        _17CC = _00F263D1(_17CD);
        if ((_17CC == 0x23) || (_17CC == 0x40))
        {
            if (_17CC == 0x23)
            {
                if (_17CD)
                {
                    break;
                }
            }
            SysMemcpy(_17B7, (U8*)"密码验证失败", 0x0014);
            _00F2ACED(_17B7, 0x02);
            break;
        }
        else if (_17CC == 0x01)
        {
            if (_17CD)
            {
                GuiTimeDayIntRefresh();
            }
            if (_17CD == 0x01)
            {
                _17CD = 0x01;
            }
            else
            {
                _17CD *= 0x02;
            }
            g_PwdChecked |= _17CD;
            SysCursorWriteParam(_17B2);
            GuiSetKbdState(_17B0);
            SysLcdPartClear(0x00, 0x00, 0x9E, 0x5F);
            SysIconAllRestore(&_17A4);
            GuiLeavePswCheck();
            return 0x01;
        }
    }
    if (_17CD)
    {
        GuiTimeDayIntRefresh();
    }
    SysCursorWriteParam(_17B2);
    GuiSetKbdState(_17B0);
    SysLcdPartClear(0x00, 0x00, 0x9E, 0x5F);
    SysIconAllRestore(&_17A4);
    GuiLeavePswCheck();
    return 0x00;
}

// 00F2ACED - 00F2AFDB
void _00F2ACED(UINT8* str, UINT8 timeout)
{
    UINT8 left = 0x0A;
    UINT8 top = 0x24;
    SysLcdPartClear(left, top, left + 0x0088, top + 0x16);
    SysRect(left, top, left + 0x0087, top + 0x15);
    SysLine(left + 0x0088, top + 0x01, left + 0x0088, top + 0x16);
    SysLine(left + 0x01, top + 0x16, left + 0x88, top + 0x16);
    SysPrintString(left + 0x04, top + 0x03, str);
    UINT8 _16FF = 0x00;
    UINT8 _16FE = SysGetSecond();
    while (0x01)
    {
        if (_16FE != SysGetSecond())
        {
            _16FF += 0x01;
            if (_16FF == timeout)
            {
                break;
            }
            _16FE = SysGetSecond();
        }
    }
    SysClearKeyBuffer();
}


// 00F2B3F8 - 00F2B3FD
void _00F2B3F8()
{
    MCU_memory[0x180E] = 0x00;
}


// 00F2E329 - 00F2E5B0
void _00F2E329(UINT16 _17D0)
{
    UINT8 _17C7[4];
    U32 _17C3;
    FlashCapacity(&_17C3);
    UINT16 _17BF = 0x1000;
    UINT16 _17C1 = _17C3 / _17BF;
    UINT16 _17CD = _17D0 * 0x0064 / _17C1;
    _17CD = _17D0 * 0x0064 / _17C1;
    UINT8 _17CC = _17CD + 0x14 + 0x06;
    UINT8 _17CB = 0x28;
    SysLcdPartClear(0x1A, 0x28, _17CC, _17CB + 0x08);
    SysLcdReverse(0x1A, 0x28, _17CC, _17CB + 0x08);
    _17C7[0] = 0x20;
    _17C7[1] = 0x20;
    _17C7[2] = 0x20;
    _17C7[3] = 0x00;
    SysPrintString(0x3C, 0x41, _17C7);
    _itoa(_17CD & 0xFF, (char*)_17C7, 0x000A);
    SysPrintString(0x3C, 0x41, _17C7);
}

void _00F4C000(UINT8 a)
{
    if (a == 0x01)
    { // 【<-发音】【翻译->】
        _500F:
        SysChinese(0x00, 0x50, 0xA1BE); // 【
        SysAscii(0x10, 0x50, '<');
        SysAscii(0x18, 0x50, '-');
        SysChinese(0x20, 0x50, 0xB7A2); // 发
        SysChinese(0x30, 0x50, 0xD2F4); // 音
        SysChinese(0x40, 0x50, 0xA1BF); // 】
        SysChinese(0x50, 0x50, 0xA1BE); // 【
        SysChinese(0x60, 0x50, 0xB7AD); // 翻
        SysChinese(0x70, 0x50, 0xD2EB); // 译
        SysAscii(0x80, 0x50, '-');
        SysAscii(0x88, 0x50, '>');
        SysChinese(0x90, 0x50, 0xA1BF); // 】
    }
    else if (a == 0x02)
    { // 【<-全文】【单句->】
        _522E:
        SysChinese(0x00, 0x50, 0xA1BE); // 【
        SysAscii(0x10, 0x50, '<');
        SysAscii(0x18, 0x50, '-');
        SysChinese(0x20, 0x50, 0xC8AB); // 全
        SysChinese(0x30, 0x50, 0xCEC4); // 文
        SysChinese(0x40, 0x50, 0xA1BF); // 】
        SysChinese(0x50, 0x50, 0xA1BE); // 【
        SysChinese(0x60, 0x50, 0xB5A5); // 单
        SysChinese(0x70, 0x50, 0xBEE4); // 句
        SysAscii(0x80, 0x50, '-');
        SysAscii(0x88, 0x50, '>');
        SysChinese(0x90, 0x50, 0xA1BF); // 】
    }
}

void _00F4C467(UINT8 _16EB, UINT8 _16EC)
{
    SysLcdPartClear(0x00, 0x00, 0x9E, 0x5F);
    for (UINT16 _16E7 = _16EB; _16E7 < _16EC; _16E7++)
    {
        SysPrintString(0x00, _16E7 * 0x0010, MCU_memory + _16E7 * 0x0015 + 0x1C44);
    }
}

// a>5?5:a
UINT8 _00F4C591(UINT8 a)
{
    if (a > 0x05)
    {
        return 0x05;
    }
    return a;
}

UINT8 _00F4C5C7(UINT32 _1707)
{
    MsgType _16FC;
    UINT8 _16FA;
    UINT32 _16F3=0;
    UINT32 _16EF=0;
    UINT8 _16EE;
    DirectReadData(_1707, &_16EE, 0x01);
    DirectReadData(_1707 + 0x00000001, (UINT8*)&_16F3, 0x04);
    DirectReadData(_1707 + 0x00000005, (UINT8*)&_16EF, 0x04);
    UINT8 _16ED = 0x00;
    SysIconSpeaker(0x01);
    UINT8 _16F9 = _00E9F60F(0x00, _16EE + 0x01, _1707 + 0x00000009, MCU_memory+0x1C44);
    UINT8 _16F7 = 0x00;
    UINT8 _16F8 = _00F4C591(_16F9);
    _00F4C467(_16F7, _16F8);
    _00F4C000(0x01);// 00F4C000
    while (0x01)
    {
        _5809:
        if (GuiGetMsg(&_16FC))
        {
            _5841:
            if (GuiTranslateMsg(&_16FC))
            {
                _5879:
                if (_16FC.type == DICT_WM_CHAR_FUN)
                {
                    _58BC:
                    switch (_16FC.param & 0xFF)
                    {
                    case CHAR_PGUP://58E6
                        if (_16F7 >= 0x05)
                        {
                            _58F2:
                            SysLcdPartClear(0x00, 0x00, 0x9E, 0x5F);
                            _16F9 = _00E9F60F(_16ED, _16EE + 0x01, _1707 + 0x00000009, MCU_memory + 0x1C44);
                            if (_16F9 <= _16F8 - 0x05)
                            {
                                _59BF:
                                _16F7 -= 0x05;
                                _16F8 = _16F9;
                            }
                            else
                            {
                                _59D5:
                                _16F7 -= 0x05;
                                _16F8 = _16F7 + 0x05;
                            }
                            _59EB:
                            for (UINT8 _16FB = _16F7; _16FB < _16F8; _16FB++)
                            {
                                _5A12:
                                SysPrintString(0x00, (_16FB - _16F7) * 0x10, MCU_memory+_16FB * 0x0015 + 0x1C44);
                            }
                            _5A74:
                            _00F4C000(0x01);
                        }
                        break;
                    case CHAR_PGDN://5A7C
                        if (_16F9 > _16F8)
                        {
                            SysLcdPartClear(0x00, 0x00, 0x9E, 0x5F);
                            _16F9 = _00E9F60F(_16ED, _16EE + 0x01, _1707 + 0x00000009, MCU_memory + 0x1C44);
                            if (_16F9 <= _16F8 + 0x05)
                            {
                                _5B5C:
                                _16F7 += 0x05;
                                _16F8 = _16F9;
                            }
                            else
                            {
                                _5B72:
                                _16F7 += 0x05;
                                _16F8 += 0x05;
                            }
                            _5B88:
                            for (UINT8 _16FB = _16F7; _16FB < _16F8; _16FB++)
                            {
                                _5BAF:
                                SysPrintString(0x00, (_16FB - _16F7) * 0x10, MCU_memory+_16FB * 0x0015 + 0x1C44);
                            }
                            _5C11:
                            _00F4C000(0x01);
                        }
                        break;
                    case CHAR_LEFT://5C19
                        _00F4C000(0x02);
                        _16FA = 0x00;
                        while (0x01)
                        {
                            _5C2B:
                            if (GuiGetMsg(&_16FC))
                            {
                                _5C63:
                                if (GuiTranslateMsg(&_16FC))
                                {
                                    _5C9B:
                                    if (_16FC.type == DICT_WM_CHAR_FUN)
                                    {
                                        _5CDE:
                                        switch (_16FC.param & 0xFF)
                                        {
                                        case CHAR_PGUP://5D08
                                            if (_16F7 >= 0x05)
                                            {
                                                _5D14:
                                                _16F9 = _00E9F60F(_16ED, _16EE + 0x01, _1707 + 0x00000009, MCU_memory + 0x1C44);
                                                if (_16F9 <= _16F8 - 0x05)
                                                {
                                                    _16F7 -= 0x05;
                                                    _16F8 = _16F9;
                                                }
                                                else
                                                {
                                                    _16F7 -= 0x05;
                                                    _16F8 = _16F7 + 0x05;
                                                }
                                                for (UINT8 _16FB = _16F7; _16FB < _16F8; _16FB++)
                                                {
                                                    SysPrintString(0x00, (_16FB - _16F7) * 0x10, MCU_memory + _16FB * 0x0015 + 0x1C44);
                                                }
                                                _00F4C000(0x02);//00F4C000
                                            }
                                            _5E67:
                                            break;
                                        case CHAR_PGDN://5E6A
                                            if (_16F9 > _16F8)
                                            {
                                                SysLcdPartClear(0x00, 0x00, 0x9E, 0x5F);
                                                _16F9 = _00E9F60F(_16ED, _16EE + 0x01, _1707 + 0x00000009, MCU_memory + 0x1C44);
                                                if (_16F9 <= _16F8 + 0x05)
                                                {
                                                    _16F7 += 0x05;
                                                    _16F8 = _16F9;
                                                }
                                                else
                                                {
                                                    _16F7 += 0x05;
                                                    _16F8 += 0x05;
                                                }
                                                for (UINT8 _16FB = _16F7; _16FB < _16F8; _16FB++)
                                                {
                                                    SysPrintString(0x00, (_16FB - _16F7) * 0x10, MCU_memory + _16FB * 0x0015 + 0x1C44);
                                                }
                                                _00F4C000(0x02);//00F4C000
                                            }
                                            break;
                                        case CHAR_LEFT://6007
                                            for (_16ED = 0x00; _16ED < _16EE; _16ED++)
                                            {
                                                _602C:
                                                _16F9 = _00E9F60F(_16ED, _16EE + 0x01, _1707 + 0x00000009, MCU_memory + 0x1C44);
                                                _16F7 = 0x00;
                                                _16F8 = _00F4C591(_16F9);
                                                _00F4C467(_16F7, _16F8);
                                                _00E9F510(_16ED, _16EE + 0x01, _1707 + _16EF);
                                                if ((0x00000001 & (DictSysFlag >> 0x00000018)) == 0x00000001)
                                                {
                                                    _6164:
                                                    _16ED++;
                                                    break;
                                                }
                                                else if ((DictSysFlag & 0x00000006) > 0x00000001) // ALARM或SCHED为开
                                                {
                                                _619A:
                                                    _16ED++;
                                                    break;
                                                }
                                            }
                                            _61AB:
                                            _00F4C000(0x02);
                                            _16ED--;
                                            break;
                                        case CHAR_UP://61BE
                                            if (_16ED + 1 > 1)
                                            {
                                                _61D2:
                                                _16ED--;
                                                _16F9 = _00E9F60F(_16ED, _16EE + 0x01, _1707 + 0x00000009, MCU_memory + 0x1C44);
                                                _16F7 = 0x00;
                                                _16F8 = _00F4C591(_16F9);
                                                _00F4C467(_16F7, _16F8);
                                                _00F4C000(0x02);
                                            }
                                            _6293:
                                            break;
                                        case CHAR_DOWN://6296
                                            if (_16ED < _16EE - 0x01)
                                            {
                                                _62AB:
                                                _16ED++;
                                                _16F9 = _00E9F60F(_16ED, _16EE + 0x01, _1707 + 0x00000009, MCU_memory + 0x1C44);
                                                _16F7 = 0x00;
                                                _16F8 = _00F4C591(_16F9);
                                                _00F4C467(_16F7, _16F8);
                                                _00F4C000(0x02);
                                            }
                                            _636C:
                                            break;
                                        case CHAR_RIGHT://636F
                                            _16F9 = _00E9F60F(_16ED, _16EE + 0x01, _1707 + 0x00000009, MCU_memory + 0x1C44);
                                            _16F7 = 0x00;
                                            _16F8 = _00F4C591(_16F9);
                                            _00F4C467(_16F7, _16F8);
                                            _00E9F510(_16ED, _16EE + 0x01, _1707 + _16EF);
                                            _00F4C000(0x02);
                                            break;
                                        case CHAR_HELP://6479
                                            GuiHelp(0x006B);
                                            break;
                                        case CHAR_EXIT://64A2
                                            _16FA = 0x01;
                                            break;
                                        }
                                    }
                                    else if (_16FC.type == DICT_WM_COMMAND)
                                    {
                                    _64AE:
                                        if ((_16FC.param & 0xFF) == CMD_RETURN_HOME)
                                        {
                                            SysIconSpeaker(0x00);
                                            return 0x01;
                                        }
                                    }
                                    else if (_16FC.type == DICT_WM_CHAR_ASC)
                                    {
                                    _64D8:
                                        if ((_16FC.param & 0xFF) == '7')
                                        {
                                            _00E860F8();
                                        }
                                        else if ((_16FC.param & 0xFF) == '0')
                                        {
                                            _00E9F510(_16ED, _16EE + 0x01, _1707 + _16EF);
                                        }
                                        else if ((_16FC.param & 0xFF) == '9')
                                        {
                                            _00E9F510(_16ED, _16EE + 0x01, _1707 + _16EF);
                                            _00E9F510(_16ED, _16EE + 0x01, _1707 + _16EF);
                                            _00E9F510(_16ED, _16EE + 0x01, _1707 + _16EF);
                                        }
                                    }
                                    _6672:
                                    if (_16FA == 0x01)
                                    {
                                        _667E:
                                        _00F4C000(0x01);
                                        break;
                                    }
                                }
                            }
                        }
                        break;
                    case CHAR_UP://668C
                        if (_16ED)
                        {
                            _16ED--;
                            _16F9 = _00E9F60F(_16ED, _16EE + 0x01, _1707 + 0x00000009, MCU_memory + 0x1C44);
                            _16F7 = 0x00;
                            _16F8 = _00F4C591(_16F9);
                            _00F4C467(_16F7, _16F8);
                            _00F4C000(0x01);
                        }
                        break;
                    case CHAR_DOWN://6764
                        if (_16ED < _16EE - 0x01)
                        {
                            _16ED++;
                            _16F9 = _00E9F60F(_16ED, _16EE + 0x01, _1707 + 0x00000009, MCU_memory + 0x1C44);
                            _16F7 = 0x00;
                            _16F8 = _00F4C591(_16F9);
                            _00F4C467(_16F7, _16F8);
                            _00F4C000(0x01);
                        }
                        break;
                    case CHAR_RIGHT://683D
                        _16F9 = _00E9F60F(_16ED, _16EE + 0x01, _1707 + _16F3, MCU_memory + 0x1C44);
                        GuiMsgBox(MCU_memory + 0x1C44, 0x0000);
                        break;
                    case CHAR_HELP://6908
                        GuiHelp(0x006B);
                        break;
                    case CHAR_EXIT://6931
                        SysIconSpeaker(0x00);
                        return 0x01;
                    }
                    continue;
                }
                else if (_16FC.type == DICT_WM_COMMAND)
                {
                _6949:
                    if ((_16FC.param & 0xFF) == CMD_RETURN_HOME)
                    {
                        SysIconSpeaker(0x00);
                        return 0x01;
                    }
                }
                else if (_16FC.type != DICT_WM_CHAR_ASC)
                {
                _6B0A:
                    continue;
                }
                _6973:
                if (_16FC.param == '7')
                {
                    _00E860F8();
                }
                else if ((_16FC.param & 0xFF) == '0')
                {
                    _00E9F510((UINT8)_16FC.param, _16EE + 0x01, _1707 + _16EF);
                }
                else if ((_16FC.param & 0xFF) == '9')
                {
                    _00E9F510(_16ED, _16EE + 0x01, _1707 + _16EF);
                    _00E9F510(_16ED, _16EE + 0x01, _1707 + _16EF);
                    _00E9F510(_16ED, _16EE + 0x01, _1707 + _16EF);
                }
            }
        }
    }
    _6B10:
    SysLcdPartClear(0x00, 0x00, 0x9E, 0x5F);
    SysIconSpeaker(0x00);
}

UINT32 _00F4DB64(UINT8 _17BD, UINT8 _17BE, UINT32 _17BF)
{
    UINT32 _17AE=0;
    UINT8 _17AD;
    UINT8 _17AC;
    UINT8 _1710[0x1A];
    MsgType _170D;
    SysLcdPartClear(0x00, 0x00, 0x9E, 0x5F);
    DirectReadData(_17BF, (UINT8*)&_17AE, 0x04);
    DirectReadData(_17BF + 0x00000004, &_17AD, 0x01);
    UINT32 _17B2 = 0x00000005;
    if (_17AD - _17BD > 0x06)
    {
        _17AC = _17BD + 0x06 - 0x01;
    }
    else
    {
        _17AC = _17AD - 0x01;
    }
    _6CEE:
    _17B2 = (UINT32)_17BD * 0x0000001A + 0x00000005;
    UINT8 _17BC = _17AC - _17BD + 0x01;
    DirectReadData(_17BF + _17B2, _1710, _17BC * 0x1A);
    for (UINT8 _170C = 0x00; _170C < (_17AC - _17BD + 0x01); _170C++)
    {
        SysPrintString(0x00, _170C * 0x10, _1710 + _170C * 0x001A + 0x0005);
    }
    SysLcdReverse(0x00, (_17BE - _17BD) * 0x0010, 0x9E, (_17BE - _17BD) * 0x0010 + 0x0F);
    _6F01:
    while (0x01)
    {
        _6F08:
        if (GuiGetMsg(&_170D))
        {
            _6F40:
            if (GuiTranslateMsg(&_170D))
            {
                _6F78:
                UINT8 _170B = 0x00;
                if (DICT_WM_CHAR_FUN == _170D.type)
                {
                    _6FAF:
                    switch (_170D.param & 0xFF)
                    {
                    case CHAR_LEFT: // 6FD9
                    case CHAR_UP: // 6FD9
                        if (_17BE > _17BD)
                        {
                            UINT8 _17B6 = (_17BE - _17BD) * 0x10;
                            SysLcdReverse(0x00, _17B6, 0x9E, (_17BE - _17BD) * 0x10 + 0x0F);
                            _17BE--;
                            _17B6 = (_17BE - _17BD) * 0x10;
                            SysLcdReverse(0x00, _17B6, 0x9E, (_17BE - _17BD) * 0x10 + 0x0F);
                        }
                        else if ((_17BD != 0xFF) && (_17BD != 0x00))
                        {
                            UINT8 _17B6 = _17AC - _17BD;
                            if (_17B6 == 0x05)
                            {
                                _17BD--;
                            }
                            else
                            {
                                _17BD--;
                                _17AC--;
                            }
                            _17BE = _17BD;
                            _170B = 0x01;
                        }
                        break;
                    case CHAR_DOWN: // 711A
                    case CHAR_RIGHT: // 711A
                        if (_17BE < _17AC)
                        {
                            UINT8 _17B6 = (_17BE - _17BD) * 0x10;
                            SysLcdReverse(0x00, _17B6, 0x9E, (_17BE - _17BD) * 0x10 + 0x0F);
                            _17BE++;
                            _17B6 = (_17BE - _17BD) * 0x10;
                            SysLcdReverse(0x00, _17B6, 0x9E, (_17BE - _17BD) * 0x10 + 0x0F);
                        }
                        else if (_17AC < (_17AD - 0x01))
                        {
                            UINT8 _17B6 = (_17BE - _17BD) * 0x10;
                            SysLcdReverse(0x00, _17B6, 0x9E, (_17BE - _17BD) * 0x10 + 0x0F);
                            _17B6 = _17AC - _17BD;
                            if (_17B6 < 0x05)
                            {
                                _17AC++;
                            }
                            else
                            {
                                _17AC++;
                                _17BD++;
                            }
                            _17BE = _17AC;
                            _170B = 0x01;
                        }
                        break;
                    case CHAR_PGUP: // 72B6
                        if (_17BD)
                        {
                            if (_17BD < 0x06)
                            {
                                UINT8 _17B6 = (_17BE - _17BD) * 0x10;
                                SysLcdReverse(0x00, _17B6, 0x9E, (_17BE - _17BD) * 0x10 + 0x0F);
                                _17BD = 0x00;
                                _17AC = 0x05;
                                _17BE = _17BD;
                                _170B = 0x01;
                            }
                            else
                            {
                                UINT8 _17B6 = (_17BE - _17BD) * 0x10;
                                SysLcdReverse(0x00, _17B6, 0x9E, (_17BE - _17BD) * 0x10 + 0x0F);
                                _17B6 = _17AC - _17BD;
                                if (_17B6 < 0x05)
                                {
                                    _17BD -= 0x06;
                                    _17AC = _17BD + 0x05;
                                }
                                else
                                {
                                    _17AC--;
                                    _17BD -= 0x06;
                                }
                                _17BE = _17BD;
                                _170B = 0x01;
                            }
                        }
                        break;
                    case CHAR_PGDN: // 73FF
                        if (_17AC < (_17AD - 0x01))
                        {
                            UINT8 _17B6 = (_17BE - _17BD) * 0x10;
                            SysLcdReverse(0x00, _17B6, 0x9E, (_17BE - _17BD) * 0x10 + 0x0F);
                            if (_17AD - _17AC > 0x06)
                            {
                                _17AC += 0x06;
                                _17BD += 0x06;
                            }
                            else
                            {
                                _17AC = _17AD - 0x01;
                                _17BD += 0x06;
                            }
                            _17BE = _17BD;
                            _170B = 0x01;
                        }
                        break;
                    case CHAR_EXIT: // 74C9
                        MCU_memory[0x1C1B]--;
                        return _17AE;
                    case CHAR_ENTER: // 74FD
                        if (_1710[(_17BE - _17BD) * 0x1A] == 0x01)
                        {
                            _7545:
                            if (_00F4C5C7(_17BF + (_17BE - _17BD) * 0x1A + 0x01) == 0x01)
                            {
                                return 0xFFFFFFFF;
                            }
                            SysLcdPartClear(0x00, 0x00, 0x9E, 0x5F);
                            _170B = 0x01;
                        }
                        else
                        {
                            _7626:
                            MCU_memory[MCU_memory[0x1C1B] * 0x0002 + 0x1C1C] = _17BD;
                            MCU_memory[MCU_memory[0x1C1B] * 0x0002 + 0x1C1C + 0x01] = _17BE;
                            MCU_memory[0x1C1B]++;
                            return *(UINT32*)(_1710 + (_17BE - _17BD) * 0x1A + 0x01);
                        }
                        break;
                    }
                }
                else if (DICT_WM_COMMAND == _170D.type)
                {
                _7734:
                    if ((_170D.param & 0xFF) == CMD_RETURN_HOME)
                    {
                        MCU_memory[0x1C1B] = 0x00;
                        return 0xFFFFFFFF;
                    }
                }
                _7771:
                if (_170B == 0x01)
                {
                    UINT32 _17B6 = *(UINT32*)(MCU_memory + _17BD);
                    _17B2 = _17B6 * 0x0000001A + 0x00000005;
                    _17B6 = _17BF + _17B2;
                    _17BC = _17AC - _17BD + 0x01;
                    DirectReadData(_17B6, _1710, _17BC * 0x1A);
                    SysLcdPartClear(0x00, 0x00, 0x9E, 0x5F);
                    for (UINT8 _170C = 0x00; _170C < _17AC - _17BD + 0x01; _170C++)
                    {
                        UINT8 _17B6 = _170C * 0x10;
                        SysPrintString(0x00, _17B6, _1710 + _170C * 0x001A + 0x0005);
                    }
                    SysLcdReverse(0x00, (_17BE - _17BD) * 0x10, 0x9E, (_17BE - _17BD) * 0x10 + 0x0F);
                }
            }
        }
    }
}

void _00F4E9DD(UINT32 _17CC)
{
    SysIconAllClear();
    GuiSetInputFilter(INPUT_NUM_ENABLE);
    GuiSetKbdType(SYS_NUM_KBD);
    SysIconNum(0x00);
    _17CC += 0x00000040;
    MCU_memory[0x1C1B] = 0x00;
    for (UINT8 _17C7 = 0x00; _17C7 < 0x14; _17C7++)
    {
        MCU_memory[_17C7 * 0x0002 + 0x1C1C] = 0x00;
        MCU_memory[_17C7 * 0x0002 + 0x1C1C + 0x0001] = 0x00;
    }
    UINT32 _17C3 = _00F4DB64(MCU_memory[MCU_memory[0x1C1B] * 0x0002 + 0x1C1C], MCU_memory[MCU_memory[0x1C1B] * 0x0002 + 0x1C1C + 1], _17CC);
    while (_17C3 != 0xFFFFFFFF)
    {
        _17C3 = _00F4DB64(MCU_memory[MCU_memory[0x1C1B] * 0x0002 + 0x1C1C], MCU_memory[MCU_memory[0x1C1B] * 0x0002 + 0x1C1C + 1], _17CC + _17C3);
    }
}

void _00F8B026()
{
    fillmem(MCU_memory + 0x2810, 0x0008, 0x00);
    fillmem(MCU_memory + 0x2818, 0x00F0, 0xFE);
}

// 00FC8000 - 00FC81EE
void _00FC8000(UINT8* _17D0)
{
    SysIconScrollBarUpArrow(0x01);
    SysIconScrollBarDownArrow(0x01);
    if (*(UINT16*)_17D0 == 0x0001)
    {
    _5051:
        SysIconScrollBarUpArrow(0x00);
    }
_505E:
    if (*(UINT16*)_17D0 - *(UINT16*)(_17D0 + 0x04) < 0x80) // todo 汇编判断条件未理解
    {
    _50B9:
        SysIconScrollBarDownArrow(0x00);
    }
_50C6:
    UINT32 _17C8 = *(UINT16*)_17D0;
    _17C8 *= 0x00000064;
    UINT32 _17CC = *(UINT16*)(_17D0 + 0x04);
    UINT8 _17C7 = _17C8 / _17CC;
    SysIconSetLeftScrollBar(_17C7);
    _00FC83B3(_17D0);
    _00FC860E(*(UINT16*)_17D0);
}

// 00FC81EF - 00FC83B2
void _00FC81EF(UINT8* _17D0)
{
    SysIconScrollBarUpArrow(0x01);
    SysIconScrollBarDownArrow(0x01);
    if (_17D0[0x07] + 0x01 == _17D0[0x2C] + 0x01)
    {
    _524F:
        SysIconScrollBarUpArrow(0x00);
    }
    _525C:
    if (_17D0[0x07] + 0x01 >= _17D0[0x0A])
    {
    _528F:
        SysIconScrollBarDownArrow(0x00);
    }
_529C:
    UINT32 _17C8 = _17D0[0x07] + 0x01;
    _17C8 *= 0x00000064;
    UINT32 _17CC = _17D0[0x0A];
    UINT8 _17C7 = _17C8 / _17CC;
    SysIconSetLeftScrollBar(_17C7);
    _00FC83B3(_17D0);
    _00FC860E(_17D0[0x07]+0x01);
}

// 00FC83B3 - 00FC8505
void _00FC83B3(UINT8* _17D0)
{
    if (_17D0[0x0024 + _17D0[0x06] - 0x01])
    {
    _5417:
        SysIconLeftArrow(0x01);
        SysIconRightArrow(0x01);
        if (_17D0[0x08] + 0x01 == 0x01)
        {
        _544B:
            SysIconLeftArrow(0x00);
        }
    _5458:
        if (_17D0[0x08] + 0x12 >= _17D0[0x001F + _17D0[0x06] - 0x01])
        {
        _54CB:
            SysIconRightArrow(0x00);
        }
    }
    else
    {
    _54DB:
        SysIconLeftArrow(0x00);
        SysIconRightArrow(0x00);
    }
}

// 00FC8506 - 00FC860D
UINT16 _00FC8506(UINT8 _17CF, UINT8* _17D0, UINT8* _17D2)
{
    _17D2[0x08] = 0x00;
    for (UINT16 _17CD = 0x0000; _17CD < _17D0[0x07]; _17CD++)
    {
    _5599:
        if (_17CF == *(UINT8*)(_17CD + *(UINT16*)(_17D0 + 0x05)))
        {
        _55E2:
            return 0x0001;
        }
    }
_55F0:
    return 0x0000;
}

// 00FC860E - 00FC87A1
void _00FC860E(UINT32 _17D0)
{
    UINT8 _17CB[4];
    for (UINT8 _17C9 = 0x00; _17C9 + 0x01 < 0x05; _17C9++)
    {
    _5644:
        if (0x03 - _17C9 + 0x01 != 0x01)
        {
        _5656:
            UINT16 _17C7 = _00FC87A2(0x03 - _17C9);
            UINT8 _17CA = _17D0 / _17C7;
            _17D0 -= _17CA * _17C7;
            _17CB[_17C9] = _17CA;
        }
        else
        {
        _570E:
            _17CB[_17C9] = _17D0;
        }
    }
    _5755:
    SysIconNumber1(_17CB[0]);
    SysIconNumber2(_17CB[1]);
    SysIconNumber3(_17CB[2]);
    SysIconNumber4(_17CB[3]);
}

// 00FC87A2 - 00FC883B
UINT16 _00FC87A2(UINT8 _17CF)
{
    UINT16 _17CB = 0x0001;
    for (UINT8 _17CD = 0x00; _17CD + 0x01 < _17CF + 0x01; _17CD++)
    {
    _57F7:
        _17CB *= 0x000A;
    }
_581B:
    return _17CB;
}

// 00FC883C - 00FC891E
void _00FC883C(UINT8* _17D0)
{
    _17D0[0x06] = 0x01;
    UINT8 _17CF = _17D0[0x2C];
    _17D0[0x07] = _17CF;
    _17D0[0x08] = 0x00;
    _17CF = _17D0[0x2C];
    _17D0[0x09] = _17CF;
}

// 00FC891F - 00FC8A13
void _00FC891F(UINT8* _17D0, UINT8* _17D2)
{
    _17D2[0x002C] = 0x00;
    if (*(UINT16*)(_17D2 + 0x04) == 0x0005) // todo 汇编判断条件未理解
    {
    _5975:
        _17D2[0x29] = 0x00;
    }
    else
    {
    _599E:
        _17D2[0x29] = 0x05;
    }
_59C4:
    _17D2[0x0A] = 0x05;
    _00FC883C(_17D2);
}

// 00FC8A14 - 00FC8ABA
UINT8 _00FC8A14(UINT8* _17D0, UINT8 _17D2)
{
    UINT8 _17CF = 0x00;
    UINT8 _17CE = 0x01;
    do
    {
        _5A30:
        if (*_17D0 < 0x80)
        {
        _5A47:
            _17CE = 0x01;
        }
        else
        {
        _5A50:
            _17CE = 0x02;
        }
    _5A56:
        _17CF += _17CE;
        _17D0 += _17CE;
    } while (_17CF < _17D2);
_5AA1:
    return _17CE;
}